-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[utils] extract_timezone() removes trailing year from time+date-type date-time string #29948
Comments
A check against this issue was added at 15ac841 but did not survive the subsequent introduction of Separate processing for time-zones is needed because because time-zone formatting is only in Py>=3.2. Another possible fix is to restrict the pattern used in Some more unit tests for the date-time utility functions would be good. |
Code taken from: ytdl-org/youtube-dl#29845 Fixes: ytdl-org/youtube-dl#29948 Authored by: dirkf
* 'master' of https://github.com/yt-dlp/yt-dlp: [CBC] Fix CBC Gem extractors (#1013) [Peertube] Add channel extractor (#1023) [youtube] Warn when trying to download clips [test/cookies] Improve logging [Nuvid] Fix extractor (#1022) [aes] Add `aes_gcm_decrypt_and_verify` (#1020) [CGTN] Add extractor (#981) [utils] Improve `extract_timezone` Code taken from: ytdl-org/youtube-dl#29845 Fixes: ytdl-org/youtube-dl#29948 Authored by: dirkf
Code taken from: ytdl-org/youtube-dl#29845 Fixes: ytdl-org/youtube-dl#29948 Authored by: dirkf
Checklist
Verbose log
N/A
Description
Looking at a recent PR, the site uses this format for the date-time:
This isn't supported by
unified_timestamp()
.If you try to support it by adding
'%H:%M %d-%b-%Y
to theDATE_FORMATS_DAY_FIRST
list, you still getNone
fromunified_timestamp()
.extract_timezone()
thinks that-2021
is a time-zone and removes it.unified_timestamp()
should try to decode the string as given; then if that hasn't worked,extract_timezone()
and retry.In the above case there are work-arounds:
Or:
The text was updated successfully, but these errors were encountered: