rss

Scrape and generate RSS feed

别等时光非礼了梦想. 提交于 2019-12-04 15:12:37
I use Simple HTML DOM to scrape a page for the latest news, and then generate an RSS feed using this PHP class . This what I have now: <?php // This is a minimum example of using the class include("FeedWriter.php"); include('simple_html_dom.php'); $html = file_get_html('http://www.website.com'); foreach($html->find('td[width="380"] p table') as $article) { $item['title'] = $article->find('span.title', 0)->innertext; $item['description'] = $article->find('.ingress', 0)->innertext; $item['link'] = $article->find('.lesMer', 0)->href; $item['pubDate'] = $article->find('span.presseDato', 0)-

How to monitor Google Alert RSS feed produced “as-it-happens”?

痴心易碎 提交于 2019-12-04 12:51:08
I have a Google Alert, which I set to be delivered as an RSS feed as-it-happens But is polling that RSS feed the only way to get RSS feed or is there a way to get notified from Google alert as the feed is published from Google? (say through a webservice, etc) derekvanvliet Google Alerts feeds support PubSubHubbub which essentially pushes notifications of updated content to you if you register on the feed's hub. They're using the hub at pubsubhubbub.appspot.com More info on PuSH here: http://code.google.com/p/pubsubhubbub/ Sounds like you want a PubSubHubBub for your alerts 来源: https:/

How to get entire news content from a news website

柔情痞子 提交于 2019-12-04 12:44:27
I am planning to make a desktop application which will have 5 regional newspapers and the user can select either of them to read it. I need seperate colums such as Opinion,Editorial,Breaking News,Sports,etc. which means I need data of their every column. But when I visited few papers' websites,they are just giving the headline, one line description and a link to read more as xml feed.On clicking the link the user is directed to their website. I have seen many android applications like news Hunt ,World news,etc , which show the entire content.How do they do it?Are they using any backdoor or

Table View takes a lot of time to refresh after “reloadData()”

旧巷老猫 提交于 2019-12-04 12:37:00
问题 This is what Im trying to do: Get a xml from apple's RSS containing info about apps, parse it, and display the apps in an UITable view. The problem is that after the "reloadData()" it takes about 5 seconds until the info displayed. Also, the app always crashes the first time it run after opening the project. here is the project: http://www.mediafire.com/?2dn6g916bh9uf4v 回答1: The accepted idiom for displaying slow-loading (i.e., network-based) data in a table is to show an activity indicator

Which is better for encoding HTML for RSS?

北战南征 提交于 2019-12-04 12:19:47
I recently introduced HTML into some RSS feeds that I publish (which up to now only had plain text, no markup), and I was wondering which method is better: use character encoding (such as htmlspecialchars) or just encapsulate everything in CDATA? It seems to me that CDATA might be easier, but I'm unclear as to whether there might be any reasons (subtle or otherwise) for choosing one approach versus the other. (For starters, the CDATA approach would be easier to read when viewing source...) CDATA is for any data that should not be parsed by the XML parser. Any tags not in a CDATA block will be

Why does my RSS feed duplicate some entries?

◇◆丶佛笑我妖孽 提交于 2019-12-04 11:53:40
when reading my RSS feed with Thunderbird feed reader, some entries are duplicated. Google reader does not have the same problem. Here is the faulty feed http://plcoder.net/rss.php?rss=Blog There is a problem, but where? Regards, Cédric update : I add guid but the problem remain. Anothers feeds does not duplicate like mine, so I will re-work on this module and replace this old good code. conclusion : I re-work completely the rss generator code, and it's ok. I think I was using a very old version of RDF. Try adding a <guid> tag to each item, giving it a permalink. i.e.: <item rdf:about="http:/

Parse RSS pubDate to Date object in JavaScript

烈酒焚心 提交于 2019-12-04 11:29:44
How would I do this? Tue, 2 Feb 2010 19:34:21 Etc/GMT It works right out of the box. The Date object in JavaScript can be set by passing a number of standard time formats. The format used in RSS is one of these. Example: var pubDate = "Sun, 27 Mar 2011 20:17:21 +0100"; var date = new Date(pubDate); var months = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var string = date.getDate() + " " + months[date.getMonth()] + " " + date.getFullYear() alert(string); 来源: https://stackoverflow.com/questions/2191121/parse

Parse an RSS feed in Android

主宰稳场 提交于 2019-12-04 10:52:57
Android : how to parse THIS XML PARSE I would like to parse a RSS feed. My question is how can I parse all tags between the <item> and </item> tags. <channel> <title>Pub post</title> <atom:link href="http://abishtpub.wordpress.com/feed/" rel="self" type="application/rss+xml"/> <link>http://abishtpub.wordpress.com</link> <description>A fine WordPress.com site</description> <item> <title>multi-content</title> <media:content url="http://1.gravatar.com/avatar/afb466de71a710f1e901250488e9ebd6? s=96&d=identicon&r=G" medium="image"> <media:title type="html">abisht</media:title> </media:content>

Add WordPress featured image to RSS feed

荒凉一梦 提交于 2019-12-04 10:51:06
问题 I'm setting up an RSS to email campaign in MailChimp using my WordPress RSS Feed, and I want to include the featured image in my MailChimp template. I've tried using this to add the image, which works, but it simply adds it to the content, which doesn't work for MailChimp section of the RSS code: function featuredtoRSS($content) { global $post; if ( has_post_thumbnail( $post->ID ) ){ $content = '' . get_the_post_thumbnail( $post->ID, 'thumbnail', array( 'style' => 'float:left; margin:0 15px

How to detect changed and new items in an RSS feed?

这一生的挚爱 提交于 2019-12-04 09:48:04
Using feedparser or some other Python library to download and parse RSS feeds; how can I reliably detect new items and modified items? So far I have seen new items in feeds with publication dates earlier than the latest item. Also I have seen feed readers displaying the same item published with slightly different content as seperate items. I am not implementing a feed reader application, I just want a sane strategy for archiving feed data. It depends on how much you trust the feed source. feedparser provides an .id attribute for feed items -- this attribute should be unique for both RSS and