mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-03 23:44:50 +00:00
[cleanup] Misc
This commit is contained in:
@@ -23,7 +23,6 @@ from ..utils import (
|
||||
int_or_none,
|
||||
KNOWN_EXTENSIONS,
|
||||
mimetype2ext,
|
||||
network_exceptions,
|
||||
remove_end,
|
||||
parse_qs,
|
||||
str_or_none,
|
||||
@@ -711,7 +710,6 @@ class SoundcloudPagedPlaylistBaseIE(SoundcloudIE):
|
||||
query.pop('offset', None)
|
||||
|
||||
|
||||
|
||||
class SoundcloudUserIE(SoundcloudPagedPlaylistBaseIE):
|
||||
_VALID_URL = r'''(?x)
|
||||
https?://
|
||||
|
@@ -132,9 +132,9 @@ class TikTokIE(InfoExtractor):
|
||||
|
||||
class TikTokUserIE(InfoExtractor):
|
||||
IE_NAME = 'tiktok:user'
|
||||
_VALID_URL = r'(?!.*/video/)https?://www\.tiktok\.com/@(?P<id>[\w\._]+)'
|
||||
_VALID_URL = r'https?://(?:www\.)?tiktok\.com/@(?P<id>[\w\._]+)/?(?:$|[#?])'
|
||||
_TESTS = [{
|
||||
'url': 'https://www.tiktok.com/@corgibobaa?lang=en',
|
||||
'url': 'https://tiktok.com/@corgibobaa?lang=en',
|
||||
'playlist_mincount': 45,
|
||||
'info_dict': {
|
||||
'id': '6935371178089399301',
|
||||
@@ -196,7 +196,7 @@ class TikTokUserIE(InfoExtractor):
|
||||
'Referer': video_url,
|
||||
}
|
||||
}
|
||||
if not data_json['hasMore']:
|
||||
if not data_json.get('hasMore'):
|
||||
break
|
||||
cursor = data_json['cursor']
|
||||
|
||||
|
@@ -803,7 +803,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
|
||||
# We also want to catch all other network exceptions since errors in later pages can be troublesome
|
||||
# See https://github.com/yt-dlp/yt-dlp/issues/507#issuecomment-880188210
|
||||
if not isinstance(e.cause, compat_HTTPError) or e.cause.code not in (403, 429):
|
||||
last_error = error_to_compat_str(e.cause or e)
|
||||
last_error = error_to_compat_str(e.cause or e.msg)
|
||||
if count < retries:
|
||||
continue
|
||||
if fatal:
|
||||
|
Reference in New Issue
Block a user