'location': 'Victoria, British Columbia, Canada',
'view_count': int,
'comment_count': int,
- }
+ },
}, {
'url': 'http://es.pinkbike.org/i/kvid/kvid-y5.swf?id=406629',
'only_matching': True,
video_id = self._match_id(url)
webpage = self._download_webpage(
- 'http://www.pinkbike.com/video/%s' % video_id, video_id)
+ f'http://www.pinkbike.com/video/{video_id}', video_id)
formats = []
for _, format_id, src in re.findall(
'format_id': format_id,
'height': height,
})
- self._sort_formats(formats)
title = remove_end(self._og_search_title(webpage), ' Video - Pinkbike')
description = self._html_search_regex(
def extract_count(webpage, label):
return str_to_int(self._search_regex(
- r'<span[^>]+class="stat-num"[^>]*>([\d,.]+)</span>\s*<span[^>]+class="stat-label"[^>]*>%s' % label,
+ rf'<span[^>]+class="stat-num"[^>]*>([\d,.]+)</span>\s*<span[^>]+class="stat-label"[^>]*>{label}',
webpage, label, fatal=False))
view_count = extract_count(webpage, 'Views')
'location': location,
'view_count': view_count,
'comment_count': comment_count,
- 'formats': formats
+ 'formats': formats,
}