Python processing RSS ATOM module FEEDPARSER introduction

  • 2020-04-02 14:35:47
  • OfStack

Due to the shutdown of Google reader, there is a relatively high amount of RSS exposure during this time. Tried qq reader, not so good, no reading speed, whether the reading mark is not. Other sites do not want to use, and to register more accounts.

Find python's RSS processing package feedparser, the official documentation is quite detailed. (link: http://pythonhosted.org/feedparser/)


>>> import feedparser
>>> d = feedparser.parse( ' http://0x55aa.sinaapp.com/feed')
>>> a = d.feed
>>> a.title

You can use the keys to view the dictionary keys so that you can clearly understand each one. Each one is described in the official documentation.

>>> d['feed'].keys()

RSS feeds are a list in d.e.

See feedparser's official documentation for detailed and advanced usage.


Related articles: