aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAakash Gajjar <skyqutip@gmail.com>2020-08-01 11:57:52 +0530
committerAakash Gajjar <skyqutip@gmail.com>2020-08-01 11:57:52 +0530
commitb19eec0d33e40ee5466669ac810f160648787dba (patch)
treeacb09d9a552ab153df112a81a59d1ed0c1f6c87e
parent6255e567d92e7d8fe7920c34db050a95b8d3ff7f (diff)
downloadhypervideo-pre-b19eec0d33e40ee5466669ac810f160648787dba.tar.lz
hypervideo-pre-b19eec0d33e40ee5466669ac810f160648787dba.tar.xz
hypervideo-pre-b19eec0d33e40ee5466669ac810f160648787dba.zip
[fix] python 2 "url" field is missing or empty
`try_get` fails for `expected_type=str`, because in python 2 string has `unicode` type. This commit removes the `expected_type` to disable the comparison.
-rw-r--r--youtube_dl/extractor/tiktok.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/tiktok.py b/youtube_dl/extractor/tiktok.py
index 613ac9cc8..c80001fe3 100644
--- a/youtube_dl/extractor/tiktok.py
+++ b/youtube_dl/extractor/tiktok.py
@@ -34,7 +34,7 @@ class TikTokBaseIE(InfoExtractor):
formats = []
formats.append({
- 'url': try_get(video_info, lambda x: x['video']['urls'][0], str),
+ 'url': try_get(video_info, lambda x: x['video']['urls'][0]),
'ext': 'mp4',
'height': height,
'width': width
@@ -47,7 +47,7 @@ class TikTokBaseIE(InfoExtractor):
'id': str_or_none(video_info.get('id')),
'like_count': int_or_none(video_info.get('diggCount')),
'repost_count': int_or_none(video_info.get('shareCount')),
- 'thumbnail': try_get(video_info, lambda x: x['covers'][0], str),
+ 'thumbnail': try_get(video_info, lambda x: x['covers'][0]),
'timestamp': timestamp,
'width': width,
'title': self._og_search_title(webpage),