mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-23 09:17:48 +00:00
[dailymotion] Fix view count extraction and make it non fatal (fixes #1940)
This commit is contained in:
parent
7c86cd5ab1
commit
5458b4cefb
1 changed files with 4 additions and 2 deletions
|
@ -143,8 +143,10 @@ class DailymotionIE(DailymotionBaseInfoExtractor, SubtitlesInfoExtractor):
|
||||||
self._list_available_subtitles(video_id, webpage)
|
self._list_available_subtitles(video_id, webpage)
|
||||||
return
|
return
|
||||||
|
|
||||||
view_count = str_to_int(self._search_regex(
|
view_count = self._search_regex(
|
||||||
r'video_views_value[^>]+>([\d\.,]+)<', webpage, u'view count'))
|
r'video_views_count[^>]+>\s+([\d\.,]+)', webpage, u'view count', fatal=False)
|
||||||
|
if view_count is not None:
|
||||||
|
view_count = str_to_int(view_count)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
|
Loading…
Reference in a new issue