mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 12:36:11 +02:00
Merge branch 'master' of https://github.com/JimmXinu/FanFicFare
This commit is contained in:
commit
666cf0aee8
1 changed files with 4 additions and 3 deletions
|
|
@ -176,11 +176,12 @@ class GravityTalesComSiteAdapter(BaseSiteAdapter):
|
|||
|
||||
if feedparser:
|
||||
# Parse published and updated date from latest RSS feed entry. The RSS feed urls seems to appear due to
|
||||
# some JavaScript on the page, so get the URL by mangling the URL (this is not very robust, but probably good
|
||||
# enough)
|
||||
# some JavaScript on the page, so get the URL by mangling the URL (this is not very robust, but probably
|
||||
# good enough)
|
||||
rss_feed_url = url.replace('/novel/', '/feed/')
|
||||
feed = feedparser.parse(rss_feed_url)
|
||||
date_updated = datetime.fromtimestamp(time.mktime(feed.entries[0].published_parsed))
|
||||
date_updated = datetime.fromtimestamp(
|
||||
time.mktime(feed.entries[0].published_parsed)) if feed.entries else datetime.now()
|
||||
else:
|
||||
# Fall back to the previous method of generating the published and update date...
|
||||
date_updated = datetime.now()
|
||||
|
|
|
|||
Loading…
Reference in a new issue