#!/usr/bin/env python import ScrapeNFeed class MyFeed(ScrapeNFeed.ScrapedFeed): def HTML2RSS(self, headers, body): #Transform an HTTP response into a series of RSSItem objects items = [] ... #Scrape scrape scrape... ... #Then add the items to the feed. self.addRSSItems(items) #Load the feed with its metadata. This will fetch the URL, scrape it #for RSSItems, and possibly write out new RSS and pickle files. MyFeed.load('Feed title', 'Feed source: the URL to fetch and pass into HTML2RSS', 'Feed description' 'Path to destination RSS file', 'Path to pickle file containing feed state', [Any other arguments you'd pass into the RSS2 constructor])
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question