About Python RSS Processing

Source: Internet
Author: User

The Python application is a good RSS processing tool. The following articles introduce some modules that can be used for RSS processing, most of which are Python RSS processing. py users only need to care about the two classes it provides.

RSS is an abbreviation that can be expressed by multiple extensions: "RDF Site Summary" and "truly Simple Syndication) "," Rich Site Summary )". Other extensions may also be used for representation. Behind such a chaotic name, you will find that stories related to such an ordinary technology field are surprising.

Python RSS processing is a simple XML format used to distribute summaries of content on a Web site. It can be used to share a wide range of information, including (but not limited to) messaging, Web site updates, event calendars, software updates, featured content sets, and Web-based auction products. RSS was created by Netscape in 1999. It allows content from many sources of information to the Netcenter portal website (this portal does not exist now ).

Web enthusiasts in the UserLand community have become an early supporter of RSS, which soon became a very popular format. This popularity makes it difficult for people to improve RSS so that it can be used in more places. This restriction leads to a divergence in the Development of RSS.

One group chooses an RDF-based Approach to utilize a large number of RDF tools and modules, while the other group chooses a more restrictive approach. The former is called RSS 1.0, while the latter is called RSS 0.91. Last month, competition between the two was further intensified due to the emergence of a new version of RSS non-RDF variants.

This new version is called "RSS 2.0" by its creators ". RSS 0.91 and 1.0 are very popular, and many portal websites and Web logs use them. In fact, the blogging community is the main user of RSS, and Python RSS processing is an impressive reason for some existing networks for XML exchange.

These networks have grown organically and truly become the most successful XML service network. RSS becomes an XML service because it is exchanged XML information through the Internet Protocol (the vast majority of RSS exchanges are simple http get for RSS documents ).

In this article, we will introduce a few Python tools that can work with RSS. We do not provide technical introduction to RSS. Because you can get the content in many other articles. (See references ). We recommend that you familiarize yourself with RSS and XML. You do not need to understand RDF.

RSS. py compiled by Mark nottheim is a Python library for RSS processing. It is perfect and well written. It requires Python 2.2 and PyXML 0.7.1. It is easy to install. You only need to download the Python file from the Mark homepage and copy it to somewhere in your PYTHONPATH.

Most users of Python RSS processing. py only need to care about the two classes it provides: CollectionChannel and TrackingChannel. The latter seems to be a more useful one of the two classes. TrackingChannel is a data structure that contains all RSS data indexed by each keyword.

CollectionChannel is a similar data structure, but its structure is more like the RSS document itself. Its top-level channel information uses the hash value represented by URL to point to the item details. You may use the utility namespace declaration in the RSS. ns structure. Listing 1 is a simple script that downloads and parses the RSS feed for Python news and prints all the information from each item in a simple list.

  1. Python source code compilation skills
  2. Simple and Easy-to-use Python tools
  3. Introduction to the Python application field
  4. Python Android Object-Oriented Programming-Python applications
  5. How to Use the Python module to parse the configuration file?

Related Article

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.