rss

RSS feed display

霸气de小男生 提交于 2019-12-06 12:18:10
I have created a news RSS feed for my website but want to display is in a format similar to http://www.apple.com/hotnews/ How would I put code onto my HTML page which would take the items from my RSS? You could use XSLT and CSS. If you didn't care about links working, etc., then just use CSS. For instance, here is how I style one of the RSS feeds on one of my sites: channel link, channel language, channel copyright, channel managingEditor, channel webMaster, channel docs, channel lastBuildDate, channel item pubDate {display:none;} rss {font-family:Arial, Helvetica, sans-serif;} channel title

Scrape and generate RSS feed

纵然是瞬间 提交于 2019-12-06 11:54:20
问题 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']

Reading RSS feed and displaying it in Django Template | feedparser

我们两清 提交于 2019-12-06 10:21:25
问题 Refer this blog: http://johnsmallman.wordpress.com/author/johnsmallman/feed/ I want to fetch the RSS feed for my application. The above blog is a wordpress blog. I am using feedparser import feedparser feeds = feedparser.parse('http://johnsmallman.wordpress.com/author/johnsmallman/feed/') Now feeds['feed']['title'] Outputs u"Johnsmallman's Blog \xbb John Smallman" My question is How exactly i present this in my app. Lets say this blog contains 100s of articles. So i want to loop over and

Convert XML RSS feed to Json on Angular app

耗尽温柔 提交于 2019-12-06 09:55:14
问题 I have an API like this https://blog.com/rss . It returns below xml as blog feed. Note: I have seen this. But it is for nodejs app. https://github.com/nasa8x/rss-to-json So can you tell me how can I retrieve the image , title , date and the description from it? i.e. Json output from it. After that I need to show that on the html page like so: Note: This is just one node. It'll have many nodes according to the feed output. i.e. ngFor loop .html <div class="card"> <div class="card-wrapper">

Output RSS feed as html?

自闭症网瘾萝莉.ら 提交于 2019-12-06 07:25:22
Are there any free php/javascript libraries out there which would help in displaying an RSS feed as html? In my Opinion Simplepie is one of the Best RSS parsers. Here is an example: require_once('simplepie.inc'); $feed = new SimplePie(); $feed->set_feed_url('http://simplepie.org/blog/feed/'); $feed->init(); $feed->handle_content_type(); <?php foreach ($feed->get_items(0, 5) as $item): ?> <div class="item"> <h2 class="title"><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a></h2> <?php echo $item->get_description(); ?> <p><small>Posted on <?php echo $item->get

Retrieving raw XML for items with feedparser

落花浮王杯 提交于 2019-12-06 06:17:51
I'm trying to use feedparser to retrieve some specific information from feeds, but also retrieve the raw XML of each entry (ie. elements for RSS and for Atom), and I can't see how to do that. Obviously I could parse the XML by hand, but that's not very elegant, would require separate support for RSS and Atom, and I imagine it could fall out of sync with feedparser for ill-formed feeds. Is there a better way? Thanks! I'm the current developer of feedparser. Currently, one of the ways you can get that information is to monkeypatch feedparser._FeedParserMixin (or edit a local copy of feedparser

Using openStream with a URL that has a subdomain with an underscore in it returns ioexception in Android. Why?

不羁岁月 提交于 2019-12-06 06:05:01
I have the following code which is pretty standard for fetching an xml document from the web in Android (from what I understand): URL rssUrl = new URL("web_1.whatever.com"); SAXParserFactory mySAXParserFactory = SAXParserFactory.newInstance(); SAXParser mySAXParser = mySAXParserFactory.newSAXParser(); XMLReader myXMLReader = mySAXParser.getXMLReader(); RSSHandler myRSSHandler = new RSSHandler(); myXMLReader.setContentHandler(myRSSHandler); myXMLReader.parse(new InputSource(rssUrl.openStream())); This works perfectly for most situations. The issue arises when I try to fetch an XML document from

Putting content:encoded in RSS feed using ROME

99封情书 提交于 2019-12-06 06:02:41
I'm trying to put some HTML content inside <content:encoded> tags using ROME and its modules . So far I've succesfully put mediaRSS and geoRSS in the feed, but my content is not showing up. Here's my code: ContentModule contentModule = new ContentModuleImpl(); List<ContentItem> contents = new ArrayList<ContentItem>(); List<String> contentValueDOM = new ArrayList<String>(); ContentItem content = new ContentItem(); content.setContentValue("<p>Some text here</p>"); content.setContentEncoding("text/html"); content.setContentAbout("Paragraph"); content.setContentValueDOM(contentValueDOM); contents

loading rss feed into php

烈酒焚心 提交于 2019-12-06 05:25:09
What's the best way to load an RSS feed into a PHP feed? I also want to handle the media:content problems to display a image. At this moment I have the following code but I don't know if this is the best. <?php $rss = new DOMDocument(); $rss->load('http://www.hln.be/rss.xml'); $feed = array(); foreach ($rss->getElementsByTagName('item') as $node) { $item = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, 'link' => $node->getElementsByTagName('link')->item(0)->nodeValue, 'date' => $node-

Trouble importing boilerpipe in python

心不动则不痛 提交于 2019-12-06 04:54:35
I'm building an application using python which involves getting news articles from RSS feeds. As part of my project, I have decided to use boilerpipe in order to extract just the article content from the html page on which the article appears. Although boilerpipe was originally written for java, it has been ported to python too. You can see its page on github here: https://github.com/misja/python-boilerpipe The problem is that I get an exception when trying to import it using: from boilerpipe.extract import Extractor The error I get is: Traceback (most recent call last): File "", line 1, in