Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

RSS: Ignore invalid date #267

Closed
foxmask opened this issue Dec 1, 2017 · 0 comments
Closed

RSS: Ignore invalid date #267

foxmask opened this issue Dec 1, 2017 · 0 comments
Labels

Comments

@foxmask
Copy link
Owner

foxmask commented Dec 1, 2017

in th_rss, ignore completly the feed with invalid date format.

actually when _get_published return empty string (that means FeedParser could not parse the pubDate at all and return None), then the published var is set to now.

This could leads to a flood of unexpected data to the target service

so need to switch

published = now if published == '' else arrow.get(str(published)).to(settings.TIME_ZONE)

to

if published:
    published = arrow.get(str(published)).to(settings.TIME_ZONE)
@foxmask foxmask added the bug label Dec 1, 2017
foxmask pushed a commit that referenced this issue Dec 1, 2017
@foxmask foxmask closed this as completed Dec 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant