mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-09-06 19:21:59 +03:00
* made some of the updates requested, pending review given incorrect instuctions.
This commit is contained in:
@@ -232,15 +232,6 @@ class TikTokBaseIE(InfoExtractor):
|
|||||||
self.report_warning(f'{message}. {self._login_hint()}')
|
self.report_warning(f'{message}. {self._login_hint()}')
|
||||||
return video_data, status
|
return video_data, status
|
||||||
|
|
||||||
# this is the area the main video info is being extracted from
|
|
||||||
# in the present case data from TikTok is being extracted from
|
|
||||||
# a series of "script" tags with types application/json
|
|
||||||
# locationCreated is the tag being looked for to retrieve
|
|
||||||
# location tag from and is housed under
|
|
||||||
# __UNIVERSAL_DATA_FOR_REHYDRATION__
|
|
||||||
# again.
|
|
||||||
# tags includedin the finished video_data such as "author" seem to be
|
|
||||||
# included in this section.
|
|
||||||
if universal_data := self._get_universal_data(webpage, video_id):
|
if universal_data := self._get_universal_data(webpage, video_id):
|
||||||
self.write_debug('Found universal data for rehydration')
|
self.write_debug('Found universal data for rehydration')
|
||||||
status = traverse_obj(universal_data, ('webapp.video-detail', 'statusCode', {int})) or 0
|
status = traverse_obj(universal_data, ('webapp.video-detail', 'statusCode', {int})) or 0
|
||||||
@@ -615,6 +606,7 @@ class TikTokBaseIE(InfoExtractor):
|
|||||||
# audio-only slideshows have a video duration of 0 and an actual audio duration
|
# audio-only slideshows have a video duration of 0 and an actual audio duration
|
||||||
'duration': ('video', 'duration', {int_or_none}, filter),
|
'duration': ('video', 'duration', {int_or_none}, filter),
|
||||||
'timestamp': ('createTime', {int_or_none}),
|
'timestamp': ('createTime', {int_or_none}),
|
||||||
|
'location': ((('contentLocation', 'address', 'streetAddress'), ('poi', 'name')), {str}, any)
|
||||||
}),
|
}),
|
||||||
**traverse_obj(aweme_detail, ('stats', {
|
**traverse_obj(aweme_detail, ('stats', {
|
||||||
'view_count': 'playCount',
|
'view_count': 'playCount',
|
||||||
|
|||||||
Reference in New Issue
Block a user