From 6c8ac39d64c605523d07b750391e845e212a511c Mon Sep 17 00:00:00 2001 From: David Lynch Date: Wed, 29 Aug 2018 23:04:17 -0500 Subject: [PATCH] fromtimestamp still needed My bad. --- sites/royalroad.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sites/royalroad.py b/sites/royalroad.py index ad1c099..0f73691 100644 --- a/sites/royalroad.py +++ b/sites/royalroad.py @@ -53,6 +53,8 @@ class RoyalRoad(Site): # TODO: this could be more robust, and I don't know if there's post-chapter notes anywhere as well. author_note = soup.find('div', class_='author-note-portlet') - updated = int(soup.find(class_="profile-info").find('time').get('unixtime')) + updated = datetime.datetime.fromtimestamp( + int(soup.find(class_="profile-info").find('time').get('unixtime')) + ) return (author_note and (author_note.prettify() + '
') or '') + content.prettify(), updated