Parse OPML subscription lists in Python
I'm trying to use listparser to parse an OPML file from the OSS podcast manager [podgrab](https://github.com/akhilrex/podgrab). That software creates dates in the OPML in the ISO 8601 format rather than the RFC 822 format that listparser expects. Here is a minimal test that demonstrates the issue: ``` #!/usr/bin/env python3 """ Minimal test case for listparser bug with ISO 8601 dates in OPML files. This demonstrates the bug with ISO 8601 dates in OPML files and the fix. """ import listparser # Minimal OPML file with ISO 8601 date format minimal_opml = """<?xml version="1.0" encoding="UTF-8"?> <opml version="2.0"> <head> <title>Test Feed Export</title> <dateCreated>2025-04-07T19:52:30.941378073Z</dateCreated> </head> <body> <outline title="Test Feed" xmlUrl="https://example.com/feed" text="Test Feed" type="rss"></outline> </body> </opml>""" def main(): # Parse the OPML file result = listparser.parse(minimal_opml) # Check if there was an error if result['bozo'] == 1: print(f"Error detected: {result['bozo_exception']}") print("\nThis error occurs because the OPML parser expects dates in RFC 822 format,") print("but the file contains a date in ISO 8601 format (2025-04-07T19:52:30.941378073Z).") print("\nFIX: The library has been updated to support both RFC 822 and ISO 8601 date formats.") else: print("SUCCESS: The OPML file with ISO 8601 date was parsed correctly.") print(f"\nParsed date: {result['meta']['created_parsed']}") print("\nThe fix adds support for ISO 8601 date formats in addition to RFC 822 formats.") if __name__ == "__main__": main() ```
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by allenhutchison and has received 0 comments.