Skip to content
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

[cleanup] Misc (for 2024.01 release) #8968

Closed
wants to merge 62 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
e8715c2
[ie/twitch] Cleanup
bashonly Jan 10, 2024
aa9f12a
[networking] Fix `Request.headers` docstring
bashonly Jan 10, 2024
a318ca2
[docs] Explicitly close `a` tags
seproDev Jan 10, 2024
e4a327a
[docs] Vista isnt supported
pukkandan Jan 11, 2024
9f813e7
[webvtt] Slightly better error
pukkandan Jan 11, 2024
879a85a
[ie] Avoid potentially confusing imports
pukkandan Jan 11, 2024
7a92698
[ie] No `from stdlib` imports (Too strict?)
pukkandan Jan 11, 2024
25d4485
[docs] Migrated to #8977
pukkandan Jan 12, 2024
f285769
Migrated to #8978
pukkandan Jan 12, 2024
8a14752
Missed in f34804b2f920f62a6e893a14a9e2a2144b14dd23
pukkandan Jan 12, 2024
cc1ad02
Merge branch 'master' into pr/8968
seproDev Jan 20, 2024
03da517
[ie/getcourseru] Remove redirect workaround
seproDev Jan 20, 2024
7045ac8
[utils] `write_string`: Allow `out.mode` to be `None`
Grub4K Jan 27, 2024
33be3bb
Merge branch 'yt-dlp:master' into cleanup/2024-01
bashonly Jan 28, 2024
8790348
[ie/MedalTV] Cleanup
bashonly Jan 28, 2024
098bb98
Add `*.ssa` to `.gitignore` and `make clean-test`
bashonly Jan 28, 2024
23cb984
Match both http and https in `_VALID_URL`
seproDev Feb 1, 2024
19a46f5
Merge branch 'yt-dlp:master' into cleanup/2024-01
bashonly Feb 4, 2024
b1adb4e
[ie/slideslive] Cleanup
bashonly Feb 4, 2024
887f6f0
[ie/slideslive] Update tests
bashonly Feb 4, 2024
6269baa
[ie/myvideoge] Regex flag was treated as count
seproDev Feb 7, 2024
ed57069
[cleanup] Remove unused files
seproDev Feb 7, 2024
ba1b02e
Merge branch 'yt-dlp:master' into cleanup/2024-01
bashonly Feb 7, 2024
d1f4589
[ie/radiko] Extract performers as `cast` instead of `artist`
bashonly Feb 7, 2024
709e495
Add `*.mpg` to `.gitignore` and `make clean-test`
bashonly Feb 10, 2024
4677da3
[ie/MyVidster] Don't require trailing slash
seproDev Feb 15, 2024
6bcb11e
Merge branch 'yt-dlp:master' into cleanup/2024-01
bashonly Feb 15, 2024
7bb3352
Merge branch 'yt-dlp:master' into cleanup/2024-01
bashonly Feb 18, 2024
d8ba950
[ie/ArteTV] Do not redefine `format` built-in
bashonly Feb 18, 2024
c710b81
[ie/Vbox7] Update tests
seproDev Feb 18, 2024
49488bc
Merge branch 'yt-dlp:master' into cleanup/2024-01
bashonly Feb 19, 2024
bac9aa6
Update changelog overrides
bashonly Feb 19, 2024
714d11b
Merge branch 'yt-dlp:master' into cleanup/2024-01
bashonly Feb 24, 2024
7b50d71
[ie] Don't error when `netrc_machine` not found
pukkandan Jan 31, 2024
2369a2f
[utils] `DateRange`: Human readable `__str__`
pukkandan Jan 31, 2024
1ebca02
[utils] Add `repr` to `match_filter_func`
pukkandan Feb 24, 2024
ff21f2e
Fix bugs due to trailing comma
pukkandan Feb 24, 2024
1480bdd
`contextlib.suppress()` is a no-op
pukkandan Feb 24, 2024
314e906
Fix misc bugs
pukkandan Feb 24, 2024
c429337
Add lrc to gitginore
pukkandan Feb 24, 2024
2ae7596
Changelog for 4ce57d3b873c2887814cbec03d029533e82f7db5
pukkandan Feb 24, 2024
6c5c7d3
Merge remote-tracking branch 'origin/master' into pr/8968
pukkandan Feb 25, 2024
38885ba
Improve 069b2aedae2279668b6051627a81fc4fbd9c146a
pukkandan Feb 25, 2024
273db0f
Misc
pukkandan Feb 25, 2024
0d5d9d8
revert npo change
bashonly Feb 25, 2024
48cea66
Merge branch 'yt-dlp:master' into cleanup/2024-01
bashonly Feb 25, 2024
ac2066d
[ie/altcensored] Fix `categories`
bashonly Feb 25, 2024
16825e5
Merge branch 'yt-dlp:master' into cleanup/2024-01
bashonly Feb 28, 2024
d418fc2
Add `is_dash_periods` to `YoutubeDL._format_fields`
bashonly Feb 28, 2024
b0f0a68
Merge branch 'yt-dlp:master' into cleanup/2024-01
bashonly Mar 2, 2024
f7c1bec
Merge branch 'yt-dlp:master' into cleanup/2024-01
bashonly Mar 4, 2024
378d891
Empty files can be empty
bashonly Mar 9, 2024
d8de50c
Empty files can really be empty
seproDev Mar 9, 2024
02a7bb0
Bundle scripts should return exit codes
bashonly Mar 9, 2024
10cba86
Partially revert "Bundle scripts should return exit codes"
bashonly Mar 9, 2024
14028cf
Merge branch 'yt-dlp:master' into cleanup/2024-01
bashonly Mar 10, 2024
49931ab
[ie/minoto] Code cleanup
bashonly Mar 10, 2024
b34e89a
Remove casefold
pukkandan Mar 10, 2024
9600db7
[make_changelog] Add `improve` to fixes
pukkandan Mar 10, 2024
7680cf2
Merge remote-tracking branch 'origin/master' into pr/8968
pukkandan Mar 10, 2024
e6f3b0a
move README change to docs cleanup to prevent merge conflict
bashonly Mar 10, 2024
59a0272
[dependencies] Remove Py 3.6 compat code
pukkandan Jan 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -33,20 +33,23 @@ cookies
*.gif
*.jpeg
*.jpg
*.lrc
*.m4a
*.m4v
*.mhtml
*.mkv
*.mov
*.mp3
*.mp4
*.mpg
*.mpga
*.oga
*.ogg
*.opus
*.png
*.sbv
*.srt
*.ssa
*.swf
*.swp
*.tt
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -17,8 +17,8 @@ pypi-files: AUTHORS Changelog.md LICENSE README.md README.txt supportedsites \
clean-test:
rm -rf test/testdata/sigs/player-*.js tmp/ *.annotations.xml *.aria2 *.description *.dump *.frag \
*.frag.aria2 *.frag.urls *.info.json *.live_chat.json *.meta *.part* *.tmp *.temp *.unknown_video *.ytdl \
*.3gp *.ape *.ass *.avi *.desktop *.f4v *.flac *.flv *.gif *.jpeg *.jpg *.m4a *.m4v *.mhtml *.mkv *.mov *.mp3 \
*.mp4 *.mpga *.oga *.ogg *.opus *.png *.sbv *.srt *.swf *.swp *.tt *.ttml *.url *.vtt *.wav *.webloc *.webm *.webp
*.3gp *.ape *.ass *.avi *.desktop *.f4v *.flac *.flv *.gif *.jpeg *.jpg *.lrc *.m4a *.m4v *.mhtml *.mkv *.mov *.mp3 *.mp4 \
*.mpg *.mpga *.oga *.ogg *.opus *.png *.sbv *.srt *.ssa *.swf *.swp *.tt *.ttml *.url *.vtt *.wav *.webloc *.webm *.webp
clean-dist:
rm -rf yt-dlp.1.temp.md yt-dlp.1 README.txt MANIFEST build/ dist/ .coverage cover/ yt-dlp.tar.gz completions/ \
yt_dlp/extractor/lazy_extractors.py *.spec CONTRIBUTING.md.tmp yt-dlp yt-dlp.exe yt_dlp.egg-info/ AUTHORS
Expand Down
1 change: 0 additions & 1 deletion bundle/__init__.py
@@ -1 +0,0 @@
# Empty file
2 changes: 1 addition & 1 deletion bundle/py2exe.py
Expand Up @@ -20,7 +20,7 @@ def main():
'py2exe builds do not support pycryptodomex and needs VC++14 to run. '
'It is recommended to run "pyinst.py" to build using pyinstaller instead')

return freeze(
freeze(
console=[{
'script': './yt_dlp/__main__.py',
'dest_base': 'yt-dlp',
Expand Down
Binary file removed devscripts/SizeOfImage.patch
Binary file not shown.
Binary file removed devscripts/SizeOfImage_w.patch
Binary file not shown.
1 change: 0 additions & 1 deletion devscripts/__init__.py
@@ -1 +0,0 @@
# Empty file needed to make devscripts.utils properly importable from outside
6 changes: 6 additions & 0 deletions devscripts/changelog_override.json
Expand Up @@ -120,5 +120,11 @@
"when": "15f22b4880b6b3f71f350c64d70976ae65b9f1ca",
"short": "[webvtt] Allow spaces before newlines for CueBlock (#7681)",
"authors": ["TSRBerry"]
},
{
"action": "change",
"when": "4ce57d3b873c2887814cbec03d029533e82f7db5",
"short": "[ie] Support multi-period MPD streams (#6654)",
"authors": ["alard", "pukkandan"]
}
]
2 changes: 1 addition & 1 deletion devscripts/make_changelog.py
Expand Up @@ -253,7 +253,7 @@ class CommitRange:
''', re.VERBOSE | re.DOTALL)
EXTRACTOR_INDICATOR_RE = re.compile(r'(?:Fix|Add)\s+Extractors?', re.IGNORECASE)
REVERT_RE = re.compile(r'(?:\[[^\]]+\]\s+)?(?i:Revert)\s+([\da-f]{40})')
FIXES_RE = re.compile(r'(?i:Fix(?:es)?(?:\s+bugs?)?(?:\s+in|\s+for)?|Revert)\s+([\da-f]{40})')
FIXES_RE = re.compile(r'(?i:Fix(?:es)?(?:\s+bugs?)?(?:\s+in|\s+for)?|Revert|Improve)\s+([\da-f]{40})')
UPSTREAM_MERGE_RE = re.compile(r'Update to ytdl-commit-([\da-f]+)')

def __init__(self, start, end, default_author=None):
Expand Down
2 changes: 1 addition & 1 deletion test/test_networking.py
Expand Up @@ -69,7 +69,7 @@ def do_GET(self):
self.send_response(200)
self.send_header('Content-Type', 'text/plain; charset=utf-8')
self.end_headers()
self.wfile.write('{self.proxy_name}: {self.path}'.format(self=self).encode())
self.wfile.write(f'{self.proxy_name}: {self.path}'.encode())
return HTTPTestRequestHandler


Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/YoutubeDL.py
Expand Up @@ -575,7 +575,7 @@ class YoutubeDL:
'url', 'manifest_url', 'manifest_stream_number', 'ext', 'format', 'format_id', 'format_note',
'width', 'height', 'aspect_ratio', 'resolution', 'dynamic_range', 'tbr', 'abr', 'acodec', 'asr', 'audio_channels',
'vbr', 'fps', 'vcodec', 'container', 'filesize', 'filesize_approx', 'rows', 'columns',
'player_url', 'protocol', 'fragment_base_url', 'fragments', 'is_from_start',
'player_url', 'protocol', 'fragment_base_url', 'fragments', 'is_from_start', 'is_dash_periods', 'request_data',
'preference', 'language', 'language_preference', 'quality', 'source_preference', 'cookies',
'http_headers', 'stretched_ratio', 'no_resume', 'has_drm', 'extra_param_to_segment_url', 'hls_aes', 'downloader_options',
'page_url', 'app', 'play_path', 'tc_url', 'flash_version', 'rtmp_live', 'rtmp_conn', 'rtmp_protocol', 'rtmp_real_time'
Expand Down
5 changes: 0 additions & 5 deletions yt_dlp/casefold.py

This file was deleted.

4 changes: 1 addition & 3 deletions yt_dlp/dependencies/__init__.py
Expand Up @@ -53,9 +53,7 @@

try:
import websockets
except (ImportError, SyntaxError):
# websockets 3.10 on python 3.6 causes SyntaxError
# See https://github.com/yt-dlp/yt-dlp/issues/2633
except ImportError:
websockets = None

try:
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/abematv.py
Expand Up @@ -53,7 +53,7 @@ def __init__(self, ie: 'AbemaTVIE'):
# the protocol that this should really handle is 'abematv-license://'
# abematv_license_open is just a placeholder for development purposes
# ref. https://github.com/python/cpython/blob/f4c03484da59049eb62a9bf7777b963e2267d187/Lib/urllib/request.py#L510
setattr(self, 'abematv-license_open', getattr(self, 'abematv_license_open'))
setattr(self, 'abematv-license_open', getattr(self, 'abematv_license_open', None))
self.ie = ie

def _get_videokey_from_ticket(self, ticket):
Expand Down
1 change: 0 additions & 1 deletion yt_dlp/extractor/adultswim.py
Expand Up @@ -107,7 +107,6 @@ def _real_extract(self, url):
title
tvRating
}''' % episode_path
['getVideoBySlug']
else:
query = query % '''metaDescription
title
Expand Down
9 changes: 5 additions & 4 deletions yt_dlp/extractor/altcensored.py
Expand Up @@ -4,6 +4,7 @@
from .common import InfoExtractor
from ..utils import (
InAdvancePagedList,
clean_html,
int_or_none,
orderedSet,
str_to_int,
Expand Down Expand Up @@ -32,23 +33,23 @@ class AltCensoredIE(InfoExtractor):
'duration': 926.09,
'thumbnail': 'https://archive.org/download/youtube-k0srjLSkga8/youtube-k0srjLSkga8.thumbs/k0srjLSkga8_000925.jpg',
'view_count': int,
'categories': ['News & Politics'], # FIXME
'categories': ['News & Politics'],
}
}]

def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
category = clean_html(self._html_search_regex(
r'<a href="/category/\d+">([^<]+)</a>', webpage, 'category', default=None))

return {
'_type': 'url_transparent',
'url': f'https://archive.org/details/youtube-{video_id}',
'ie_key': ArchiveOrgIE.ie_key(),
'view_count': str_to_int(self._html_search_regex(
r'YouTube Views:(?:\s|&nbsp;)*([\d,]+)', webpage, 'view count', default=None)),
'categories': self._html_search_regex(
r'<a href="/category/\d+">\s*\n?\s*([^<]+)</a>',
webpage, 'category', default='').split() or None,
'categories': [category] if category else None,
}


Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/antenna.py
Expand Up @@ -67,7 +67,7 @@ def _real_extract(self, url):
webpage = self._download_webpage(url, video_id)
info = self._download_and_extract_api_data(video_id, netloc)
info['description'] = self._og_search_description(webpage, default=None)
info['_old_archive_ids'] = [make_archive_id('Ant1NewsGrWatch', video_id)],
info['_old_archive_ids'] = [make_archive_id('Ant1NewsGrWatch', video_id)]
return info


Expand Down
6 changes: 3 additions & 3 deletions yt_dlp/extractor/arte.py
Expand Up @@ -142,10 +142,10 @@ class ArteTVIE(ArteTVBaseIE):
def _fix_accessible_subs_locale(subs):
updated_subs = {}
for lang, sub_formats in subs.items():
for format in sub_formats:
if format.get('url', '').endswith('-MAL.m3u8'):
for fmt in sub_formats:
if fmt.get('url', '').endswith('-MAL.m3u8'):
lang += '-acc'
updated_subs.setdefault(lang, []).append(format)
updated_subs.setdefault(lang, []).append(fmt)
return updated_subs

def _real_extract(self, url):
Expand Down
4 changes: 2 additions & 2 deletions yt_dlp/extractor/beatbump.py
Expand Up @@ -3,7 +3,7 @@


class BeatBumpVideoIE(InfoExtractor):
_VALID_URL = r'https://beatbump\.(?:ml|io)/listen\?id=(?P<id>[\w-]+)'
_VALID_URL = r'https?://beatbump\.(?:ml|io)/listen\?id=(?P<id>[\w-]+)'
_TESTS = [{
'url': 'https://beatbump.ml/listen?id=MgNrAu2pzNs',
'md5': '5ff3fff41d3935b9810a9731e485fe66',
Expand Down Expand Up @@ -48,7 +48,7 @@ def _real_extract(self, url):


class BeatBumpPlaylistIE(InfoExtractor):
_VALID_URL = r'https://beatbump\.(?:ml|io)/(?:release\?id=|artist/|playlist/)(?P<id>[\w-]+)'
_VALID_URL = r'https?://beatbump\.(?:ml|io)/(?:release\?id=|artist/|playlist/)(?P<id>[\w-]+)'
_TESTS = [{
'url': 'https://beatbump.ml/release?id=MPREb_gTAcphH99wE',
'playlist_count': 50,
Expand Down
1 change: 1 addition & 0 deletions yt_dlp/extractor/bilibili.py
Expand Up @@ -1965,6 +1965,7 @@ class BiliIntlIE(BiliIntlBaseIE):
'only_matching': True,
}]

@staticmethod
def _make_url(video_id, series_id=None):
if series_id:
return f'https://www.bilibili.tv/en/play/{series_id}/{video_id}'
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/cableav.py
Expand Up @@ -2,7 +2,7 @@


class CableAVIE(InfoExtractor):
_VALID_URL = r'https://cableav\.tv/(?P<id>[a-zA-Z0-9]+)'
_VALID_URL = r'https?://cableav\.tv/(?P<id>[a-zA-Z0-9]+)'
_TESTS = [{
'url': 'https://cableav.tv/lS4iR9lWjN8/',
'md5': '7e3fe5e49d61c4233b7f5b0f69b15e18',
Expand Down
4 changes: 2 additions & 2 deletions yt_dlp/extractor/camfm.py
Expand Up @@ -13,7 +13,7 @@


class CamFMShowIE(InfoExtractor):
_VALID_URL = r'https://(?:www\.)?camfm\.co\.uk/shows/(?P<id>[^/]+)'
_VALID_URL = r'https?://(?:www\.)?camfm\.co\.uk/shows/(?P<id>[^/]+)'
_TESTS = [{
'playlist_mincount': 5,
'url': 'https://camfm.co.uk/shows/soul-mining/',
Expand Down Expand Up @@ -42,7 +42,7 @@ def _real_extract(self, url):


class CamFMEpisodeIE(InfoExtractor):
_VALID_URL = r'https://(?:www\.)?camfm\.co\.uk/player/(?P<id>[^/]+)'
_VALID_URL = r'https?://(?:www\.)?camfm\.co\.uk/player/(?P<id>[^/]+)'
_TESTS = [{
'url': 'https://camfm.co.uk/player/43336',
'skip': 'Episode will expire - don\'t actually know when, but it will go eventually',
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/cineverse.py
Expand Up @@ -13,7 +13,7 @@


class CineverseBaseIE(InfoExtractor):
_VALID_URL_BASE = r'https://www\.(?P<host>%s)' % '|'.join(map(re.escape, (
_VALID_URL_BASE = r'https?://www\.(?P<host>%s)' % '|'.join(map(re.escape, (
'cineverse.com',
'asiancrush.com',
'dovechannel.com',
Expand Down
7 changes: 5 additions & 2 deletions yt_dlp/extractor/common.py
Expand Up @@ -747,7 +747,7 @@ def extract(self, url):
raise
except ExtractorError as e:
e.video_id = e.video_id or self.get_temp_id(url)
e.ie = e.ie or self.IE_NAME,
e.ie = e.ie or self.IE_NAME
e.traceback = e.traceback or sys.exc_info()[2]
raise
except IncompleteRead as e:
Expand Down Expand Up @@ -1339,7 +1339,10 @@ def _get_netrc_login_info(self, netrc_machine=None):
else:
return None, None
if not info:
raise netrc.NetrcParseError(f'No authenticators for {netrc_machine}')
self.to_screen(f'No authenticators for {netrc_machine}')
return None, None

self.write_debug(f'Using netrc for {netrc_machine} authentication')
return info[0], info[2]

def _get_login_info(self, username_option='username', password_option='password', netrc_machine=None):
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/cybrary.py
Expand Up @@ -110,7 +110,7 @@ def _real_extract(self, url):


class CybraryCourseIE(CybraryBaseIE):
_VALID_URL = r'https://app\.cybrary\.it/browse/course/(?P<id>[\w-]+)/?(?:$|[#?])'
_VALID_URL = r'https?://app\.cybrary\.it/browse/course/(?P<id>[\w-]+)/?(?:$|[#?])'
_TESTS = [{
'url': 'https://app.cybrary.it/browse/course/az-500-microsoft-azure-security-technologies',
'info_dict': {
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/duoplay.py
Expand Up @@ -13,7 +13,7 @@


class DuoplayIE(InfoExtractor):
_VALID_URL = r'https://duoplay\.ee/(?P<id>\d+)/[\w-]+/?(?:\?(?:[^#]+&)?ep=(?P<ep>\d+))?'
_VALID_URL = r'https?://duoplay\.ee/(?P<id>\d+)/[\w-]+/?(?:\?(?:[^#]+&)?ep=(?P<ep>\d+))?'
_TESTS = [{
'note': 'Siberi võmm S02E12',
'url': 'https://duoplay.ee/4312/siberi-vomm?ep=24',
Expand Down
4 changes: 2 additions & 2 deletions yt_dlp/extractor/egghead.py
Expand Up @@ -19,7 +19,7 @@ def _call_api(self, path, video_id, resource, fatal=True):
class EggheadCourseIE(EggheadBaseIE):
IE_DESC = 'egghead.io course'
IE_NAME = 'egghead:course'
_VALID_URL = r'https://(?:app\.)?egghead\.io/(?:course|playlist)s/(?P<id>[^/?#&]+)'
_VALID_URL = r'https?://(?:app\.)?egghead\.io/(?:course|playlist)s/(?P<id>[^/?#&]+)'
_TESTS = [{
'url': 'https://egghead.io/courses/professor-frisby-introduces-composable-functional-javascript',
'playlist_count': 29,
Expand Down Expand Up @@ -65,7 +65,7 @@ def _real_extract(self, url):
class EggheadLessonIE(EggheadBaseIE):
IE_DESC = 'egghead.io lesson'
IE_NAME = 'egghead:lesson'
_VALID_URL = r'https://(?:app\.)?egghead\.io/(?:api/v1/)?lessons/(?P<id>[^/?#&]+)'
_VALID_URL = r'https?://(?:app\.)?egghead\.io/(?:api/v1/)?lessons/(?P<id>[^/?#&]+)'
_TESTS = [{
'url': 'https://egghead.io/lessons/javascript-linear-data-flow-with-container-style-types-box',
'info_dict': {
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/gamejolt.py
Expand Up @@ -88,7 +88,7 @@ def _parse_post(self, post_data):
'uploader_id': user_data.get('username'),
'uploader_url': format_field(user_data, 'url', 'https://gamejolt.com%s'),
'categories': [try_get(category, lambda x: '%s - %s' % (x['community']['name'], x['channel'].get('display_title') or x['channel']['title']))
for category in post_data.get('communities' or [])],
for category in post_data.get('communities') or []],
'tags': traverse_obj(
lead_content, ('content', ..., 'content', ..., 'marks', ..., 'attrs', 'tag'), expected_type=str_or_none),
'like_count': int_or_none(post_data.get('like_count')),
Expand Down
5 changes: 2 additions & 3 deletions yt_dlp/extractor/getcourseru.py
Expand Up @@ -160,9 +160,8 @@ def _real_extract(self, url):
self._login(hostname, username, password)

display_id = self._match_id(url)
# NB: 404 is returned due to yt-dlp not properly following redirects #9020
webpage, urlh = self._download_webpage_handle(url, display_id, expected_status=404)
if self._LOGIN_URL_PATH in urlh.url or urlh.status == 404:
webpage, urlh = self._download_webpage_handle(url, display_id)
if self._LOGIN_URL_PATH in urlh.url:
raise ExtractorError(
f'This video is only available for registered users. {self._login_hint("any", netrc=hostname)}',
expected=True)
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/itprotv.py
Expand Up @@ -31,7 +31,7 @@ def _check_if_logged_in(self, webpage):


class ITProTVIE(ITProTVBaseIE):
_VALID_URL = r'https://app\.itpro\.tv/course/(?P<course>[\w-]+)/(?P<id>[\w-]+)'
_VALID_URL = r'https?://app\.itpro\.tv/course/(?P<course>[\w-]+)/(?P<id>[\w-]+)'
_TESTS = [{
'url': 'https://app.itpro.tv/course/guided-tour/introductionitprotv',
'md5': 'bca4a28c2667fd1a63052e71a94bb88c',
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/kommunetv.py
Expand Up @@ -3,7 +3,7 @@


class KommunetvIE(InfoExtractor):
_VALID_URL = r'https://\w+\.kommunetv\.no/archive/(?P<id>\w+)'
_VALID_URL = r'https?://\w+\.kommunetv\.no/archive/(?P<id>\w+)'
_TEST = {
'url': 'https://oslo.kommunetv.no/archive/921',
'md5': '5f102be308ee759be1e12b63d5da4bbc',
Expand Down
4 changes: 2 additions & 2 deletions yt_dlp/extractor/lecturio.py
Expand Up @@ -172,7 +172,7 @@ def _real_extract(self, url):


class LecturioCourseIE(LecturioBaseIE):
_VALID_URL = r'https://app\.lecturio\.com/(?:[^/]+/(?P<nt>[^/?#&]+)\.course|(?:#/)?course/c/(?P<id>\d+))'
_VALID_URL = r'https?://app\.lecturio\.com/(?:[^/]+/(?P<nt>[^/?#&]+)\.course|(?:#/)?course/c/(?P<id>\d+))'
_TESTS = [{
'url': 'https://app.lecturio.com/medical-courses/microbiology-introduction.course#/',
'info_dict': {
Expand Down Expand Up @@ -209,7 +209,7 @@ def _real_extract(self, url):


class LecturioDeCourseIE(LecturioBaseIE):
_VALID_URL = r'https://(?:www\.)?lecturio\.de/[^/]+/(?P<id>[^/?#&]+)\.kurs'
_VALID_URL = r'https?://(?:www\.)?lecturio\.de/[^/]+/(?P<id>[^/?#&]+)\.kurs'
_TEST = {
'url': 'https://www.lecturio.de/jura/grundrechte.kurs',
'only_matching': True,
Expand Down
3 changes: 1 addition & 2 deletions yt_dlp/extractor/medaltv.py
Expand Up @@ -9,7 +9,6 @@
int_or_none,
str_or_none,
traverse_obj,
update_url_query,
)


Expand Down Expand Up @@ -82,7 +81,7 @@ class MedalTVIE(InfoExtractor):
def _real_extract(self, url):
video_id = self._match_id(url)

webpage = self._download_webpage(update_url_query(url, {'mobilebypass': 'true'}), video_id)
webpage = self._download_webpage(url, video_id, query={'mobilebypass': 'true'})

hydration_data = self._search_json(
r'<script[^>]*>[^<]*\bhydrationData\s*=', webpage,
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/megaphone.py
Expand Up @@ -5,7 +5,7 @@
class MegaphoneIE(InfoExtractor):
IE_NAME = 'megaphone.fm'
IE_DESC = 'megaphone.fm embedded players'
_VALID_URL = r'https://player\.megaphone\.fm/(?P<id>[A-Z0-9]+)'
_VALID_URL = r'https?://player\.megaphone\.fm/(?P<id>[A-Z0-9]+)'
_EMBED_REGEX = [rf'<iframe[^>]*?\ssrc=["\'](?P<url>{_VALID_URL})']
_TEST = {
'url': 'https://player.megaphone.fm/GLT9749789991',
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/minoto.py
Expand Up @@ -21,7 +21,7 @@ def _real_extract(self, url):
continue
container = fmt.get('container')
if container == 'hls':
formats.extend(fmt_url, video_id, 'mp4', m3u8_id='hls', fatal=False)
formats.extend(self._extract_m3u8_formats(fmt_url, video_id, 'mp4', m3u8_id='hls', fatal=False))
else:
fmt_profile = fmt.get('profile') or {}
formats.append({
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/monstercat.py
Expand Up @@ -16,7 +16,7 @@


class MonstercatIE(InfoExtractor):
_VALID_URL = r'https://www\.monstercat\.com/release/(?P<id>\d+)'
_VALID_URL = r'https?://www\.monstercat\.com/release/(?P<id>\d+)'
_TESTS = [{
'url': 'https://www.monstercat.com/release/742779548009',
'playlist_count': 20,
Expand Down