<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          atomaAtom, RSS and JSON feed parser for Python 3

          聯(lián)合創(chuàng)作 · 2023-09-28 02:23

          Atoma

          https://travis-ci.org/NicolasLM/atoma.svg?branch=master https://coveralls.io/repos/github/NicolasLM/atoma/badge.svg?branch=master

          Atom, RSS and JSON feed parser for Python 3.

          Quickstart

          Install Atoma with pip:

          pip install atoma
          

          Load and parse an Atom XML file:

          >>> import atoma
          >>> feed = atoma.parse_rss_file('rss-feed.xml')
          >>> feed.description
          'The blog relating the daily life of web agency developers'
          >>> len(feed.items)
          5

          Parsing feeds from the Internet is easy as well:

          >>> import atoma, requests
          >>> response = requests.get('http://lucumr.pocoo.org/feed.atom')
          >>> feed = atoma.parse_atom_bytes(response.content)
          >>> feed.title.value
          "Armin Ronacher's Thoughts and Writings"

          Features

          Security warning

          If you use this library to display content from feeds in a web page, you NEED to clean the HTML contained in the feeds to prevent Cross-site scripting (XSS). The bleach library is recommended for cleaning feeds.

          Useful Resources

          To use this library a basic understanding of feeds is required. For Atom, the Introduction to Atom is a must read. The RFC 4287 can help lift some ambiguities. Finally the feed validator is great to test hand-crafted feeds.

          For RSS, the RSS specification and rssboard.org have a ton of information and examples.

          For OPML, the OPML specification has a paragraph dedicated to its usage for syndication

          Non-implemented Features

          Some seldom used features are not implemented:

          • XML signature and encryption
          • Some Atom and RSS extensions
          • Atom content other than text, html and xhtml

          License

          MIT

          瀏覽 16
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  一级爱爱免费看 | 伊人激情视频 | 国产A片大全 | 狠狠躁夜夜躁人人爽天天高潮 | 天天日天天操天天插天天射 |