InQuest / ThreatIngestor

Extract and aggregate threat intelligence.
https://inquest.readthedocs.io/projects/threatingestor/
GNU General Public License v2.0
832 stars 135 forks source link

Feedparser v6.0.0 issue with _parse_date #98

Closed ninoseki closed 4 years ago

ninoseki commented 4 years ago

Threatingestor uses feedparser._parse_date but the definition of _parse_date is moved to feedparser.datetimes in the latest version feedparser (v6.0.0).

So it will cause an AttributeError.

======================================================================
ERROR: test_run_supports_both_link_url (test_sources_rss.TestRSS)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/ninoseki/.virtualenvs/threatingestor/lib/python3.8/site-packages/httpretty/core.py", line 1861, in wrapper
    return test(*args, **kw)
  File "/Users/ninoseki/Dev/ThreatIngestor/tests/test_sources_rss.py", line 128, in test_run_supports_both_link_url
    saved_state, artifacts = self.rss.run(None)
  File "/Users/ninoseki/Dev/ThreatIngestor/threatingestor/sources/rss.py", line 26, in run
    if published_parsed and published_parsed <= feedparser._parse_date(saved_state or '0001-01-01'):
AttributeError: module 'feedparser' has no attribute '_parse_date'
----------------------------------------------------------------------