mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-05-17 17:15:42 -05:00
fix test; no "js_to_json" needed for extracting "xv.conf"
This commit is contained in:
parent
810f8a2e8f
commit
a9e8e375d7
1 changed files with 2 additions and 4 deletions
|
@ -11,7 +11,6 @@
|
||||||
get_element_by_class,
|
get_element_by_class,
|
||||||
get_element_by_id,
|
get_element_by_id,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
js_to_json,
|
|
||||||
parse_duration,
|
parse_duration,
|
||||||
remove_end,
|
remove_end,
|
||||||
str_or_none,
|
str_or_none,
|
||||||
|
@ -258,7 +257,7 @@ class XVideosUserIE(InfoExtractor):
|
||||||
'description': 'md5:ad6654037aee13535b0d15a020eb82d0',
|
'description': 'md5:ad6654037aee13535b0d15a020eb82d0',
|
||||||
'thumbnails': 'count:2',
|
'thumbnails': 'count:2',
|
||||||
},
|
},
|
||||||
'playlist_mincount': 9,
|
'playlist_mincount': 8,
|
||||||
}, {
|
}, {
|
||||||
# channel; "Most commented"
|
# channel; "Most commented"
|
||||||
'url': 'https://www.xvideos.com/amateur-channels/queanfuckingcucking#_tabVideos,comments',
|
'url': 'https://www.xvideos.com/amateur-channels/queanfuckingcucking#_tabVideos,comments',
|
||||||
|
@ -324,8 +323,7 @@ def _real_extract(self, url):
|
||||||
page_base_url = f'https://www.xvideos.com/{page_path}/videos/{sort_order}'
|
page_base_url = f'https://www.xvideos.com/{page_path}/videos/{sort_order}'
|
||||||
|
|
||||||
user_info = traverse_obj(self._search_json(
|
user_info = traverse_obj(self._search_json(
|
||||||
r'<script>.*?window\.xv\.conf\s*=', webpage, 'xv.conf',
|
r'<script>.*?window\.xv\.conf\s*=', webpage, 'xv.conf', display_id, fatal=False), ('data', 'user'))
|
||||||
display_id, transform_source=js_to_json, fatal=False), ('data', 'user'))
|
|
||||||
user_id = traverse_obj(user_info, ('id_user', {str_or_none})) or display_id
|
user_id = traverse_obj(user_info, ('id_user', {str_or_none})) or display_id
|
||||||
|
|
||||||
return self.playlist_result(
|
return self.playlist_result(
|
||||||
|
|
Loading…
Reference in a new issue