Python processing rss, Atom module Feedparser Introduction

Source: Internet
Author: User
Because of Google Reader's closure, this period of contact with RSS is a lot more. Tried QQ reader, not how, reading speed is not, whether read the mark also did not. Other sites do not want to use, but also to register more accounts.

Find Python's RSS processing package Feedparser, the official documentation is very detailed. http://pythonhosted.org/feedparser/
Copy the Code code as follows:


>>> Import Feedparser
>>> d = feedparser.parse (' http://0x55aa.sinaapp.com/feed ')
>>> A = D.feed
>>> A.title


You can use keys to see the dictionary keys, so you can clearly understand the meaning of each one. Each of the official documents is presented.
Copy the Code code as follows:


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


RSS feeds are a list of articles in D.entries.

See Feedparser official documentation for detailed usage and advanced usage.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.