{"library":"feedparser","title":"Feedparser Library","description":"Feedparser is a Python library for downloading and parsing syndicated feeds, including RSS (0.9x, 1.0, 2.0), Atom (0.3, 1.0), CDF, and JSON feeds. It aims to normalize various feed types and versions into a consistent Python dictionary structure, simplifying feed processing. The current stable version is 6.0.12, and the project maintains an active release cadence with regular updates and fixes.","status":"active","version":"6.0.12","language":"en","source_language":"en","source_url":"https://github.com/kurtmckee/feedparser","tags":["feed","rss","atom","parser","syndication","xml","json"],"install":[{"cmd":"pip install feedparser","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Required for HTML sanitization and relative link resolution features, as it was removed from Python's standard library in Python 3. While not explicitly listed as a direct runtime dependency on PyPI, it is used for these specific parsing capabilities.","package":"sgmllib3k","optional":true}],"imports":[{"symbol":"feedparser","correct":"import feedparser"}],"quickstart":{"code":"import feedparser\nimport os\n\n# Replace with a real RSS/Atom feed URL\nfeed_url = os.environ.get('FEED_URL', 'http://feedparser.org/docs/examples/atom10.xml')\n\nd = feedparser.parse(feed_url)\n\nprint(f\"Feed Title: {d.feed.title}\")\nif d.entries:\n    first_entry = d.entries[0]\n    print(f\"First Entry Title: {first_entry.title}\")\n    print(f\"First Entry Link: {first_entry.link}\")\n    if hasattr(first_entry, 'published_parsed'):\n        print(f\"First Entry Published: {first_entry.published_parsed}\")\n","lang":"python","description":"Parses a given feed URL and prints the feed title, the title of the first entry, and its link. It handles both RSS and Atom feeds, normalizing their structures."},"warnings":[{"fix":"Update calls from `feedparser.SANITIZE_HTML = True; feedparser.parse(...)` to `feedparser.parse(..., sanitize_html=True)`.","message":"The `sanitize_html` and `resolve_relative_uris` flags, which were global module attributes in `feedparser` 5.x, must now be passed directly as arguments to the `feedparser.parse()` function in version 6.x.","severity":"breaking","affected_versions":"5.x to 6.x"},{"fix":"Upgrade to `feedparser` version 6.0.12 or higher to resolve the `AssertionError` crash with Python 3.10+.","message":"Older versions of `feedparser` 6.x (prior to 6.0.12) could crash with an `AssertionError` on Python 3.10+ when encountering malformed CDATA sections in feeds.","severity":"gotcha","affected_versions":"6.0.0 - 6.0.11"},{"fix":"Upgrade to `feedparser` version 6.0.11 or higher to avoid deprecation warnings related to the `cgi` module.","message":"`feedparser` 6.0.10 and earlier versions relied on Python's deprecated `cgi` module, which is slated for removal in Python 3.13. This could lead to `DeprecationWarning` messages on newer Python interpreters.","severity":"deprecated","affected_versions":"6.0.0 - 6.0.10"},{"fix":"Implement a custom timeout mechanism by monkey-patching `feedparser.api._open_resource` to use an HTTP client library like `requests` with explicit timeout parameters. Example: `feedparser.api._open_resource = lambda *args, **kwargs: requests.get(args[0], headers=headers, timeout=5).content`.","message":"The internal HTTP fetching mechanism of `feedparser` (which uses `urllib` by default) does not include a built-in timeout, potentially causing applications to hang indefinitely when a feed server is unresponsive.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure you are running Python 3.6 or later when using `feedparser` 6.x. If targeting Python 2, use `feedparser` 5.x.","message":"`feedparser` version 6.x officially dropped support for Python 2. Early 6.0.x releases had issues where `pip` might incorrectly install them on Python 2 due to incorrect wheel metadata.","severity":"breaking","affected_versions":"6.0.0 and newer"}],"env_vars":null,"last_verified":"2026-04-05T00:00:00.000Z","next_check":"2026-07-04T00:00:00.000Z"}