-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ Feature request ] Add getPublishedDate method #2
Comments
To be added in next commit.
Dne út 23. 8. 2022 21:54 uživatel trueToastedCode ***@***.***>
napsal:
… The preview url also contains the published date. Could be extracted like
that:
def getPublishedDate(self):
previewUrl = self.getPreviewURL()
match = re.search('\d{4}/\d{2}/\d{2}/\d{2}/\d{2}', previewUrl)
if not match:
return
parts = match.group().split('/')
return datetime(int(parts[0]), int(parts[1]), int(parts[2]),
int(parts[3]), int(parts[4]), tzinfo=timezone.utc)
—
Reply to this email directly, view it on GitHub
<#2>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACM7NGLHY4LJOWAV2UYP2JLV2UUARANCNFSM57MYNTMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I noticed that in some cases the preview url actually doesn't include the hour and minute. An adopted version would be:
|
Closed by 4fb31df52f298e9e7285fb8f4e9f555c879c3a0f |
The preview url also contains the published date. Could be extracted like that:
The text was updated successfully, but these errors were encountered: