diff options
author | Simon Sawicki <contact@grub4k.xyz> | 2023-09-17 12:56:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-17 12:56:50 +0200 |
commit | 836e06d246512f286f30c1371b2c54b72c9ecd93 (patch) | |
tree | 1f492da9a5f245b7e96d5a1a45aeb643dd0d1a8d /yt_dlp/extractor/motherless.py | |
parent | 94389b225d9bcf29aa7ba8afaf1bbd7c62204eae (diff) |
[core] Fix support for upcoming Python 3.12 (#8130)
This also adds the following test runners:
- `3.12-dev` on `ubuntu-latest`
- `3.12-dev` on `windows-latest`
- `pypy-3.10` on `ubuntu-latest`
Authored by: Grub4K
Diffstat (limited to 'yt_dlp/extractor/motherless.py')
-rw-r--r-- | yt_dlp/extractor/motherless.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/extractor/motherless.py b/yt_dlp/extractor/motherless.py index 769b52ce6..e359c44e9 100644 --- a/yt_dlp/extractor/motherless.py +++ b/yt_dlp/extractor/motherless.py @@ -151,7 +151,7 @@ class MotherlessIE(InfoExtractor): 'd': 'days', } kwargs = {_AGO_UNITS.get(uploaded_ago[-1]): delta} - upload_date = (datetime.datetime.utcnow() - datetime.timedelta(**kwargs)).strftime('%Y%m%d') + upload_date = (datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(**kwargs)).strftime('%Y%m%d') comment_count = len(re.findall(r'''class\s*=\s*['"]media-comment-contents\b''', webpage)) uploader_id = self._html_search_regex( |