1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-30 04:08:01 +01:00

[moviefap] Fix flake8 warnings introduced in 1a5fd4e

This commit is contained in:
George Brighton 2015-06-27 23:04:55 +01:00
parent 5a9cc19972
commit db652ea186

View File

@ -78,8 +78,8 @@ class MovieFapIE(InfoExtractor):
webpage = self._download_webpage(url, video_id) webpage = self._download_webpage(url, video_id)
# find and retrieve the XML document detailing video download URLs # find and retrieve the XML document detailing video download URLs
info_url = self._html_search_regex( \ info_url = self._html_search_regex(
r'flashvars\.config = escape\("(.+?)"', webpage, 'player parameters') r'flashvars\.config = escape\("(.+?)"', webpage, 'player parameters')
xml = self._download_xml(info_url, video_id) xml = self._download_xml(info_url, video_id)
# find the video container # find the video container
@ -112,24 +112,24 @@ class MovieFapIE(InfoExtractor):
return { return {
'id': video_id, 'id': video_id,
'formats': formats, 'formats': formats,
'title': self._html_search_regex( \ 'title': self._html_search_regex(
r'<div id="view_title"><h1>(.*?)</h1>', webpage, 'title'), r'<div id="view_title"><h1>(.*?)</h1>', webpage, 'title'),
'display_id': re.compile(self._VALID_URL).match(url).group('name'), 'display_id': re.compile(self._VALID_URL).match(url).group('name'),
'thumbnails': self.__get_thumbnail_data(xml), 'thumbnails': self.__get_thumbnail_data(xml),
'thumbnail': xpath_text(xml, 'startThumb', 'thumbnail'), 'thumbnail': xpath_text(xml, 'startThumb', 'thumbnail'),
'description': self._html_search_regex( \ 'description': self._html_search_regex(
r'name="description" value="(.*?)"', webpage, 'description', fatal=False), r'name="description" value="(.*?)"', webpage, 'description', fatal=False),
'uploader_id': self._html_search_regex( \ 'uploader_id': self._html_search_regex(
r'name="username" value="(.*?)"', webpage, 'uploader_id', fatal=False), r'name="username" value="(.*?)"', webpage, 'uploader_id', fatal=False),
'view_count': str_to_int(self._html_search_regex( \ 'view_count': str_to_int(self._html_search_regex(
r'<br>Views <strong>([0-9]+)</strong>', webpage, 'view_count, fatal=False')), r'<br>Views <strong>([0-9]+)</strong>', webpage, 'view_count, fatal=False')),
'average_rating': float(self._html_search_regex( \ 'average_rating': float(self._html_search_regex(
r'Current Rating<br> <strong>(.*?)</strong>', webpage, 'average_rating', fatal=False)), r'Current Rating<br> <strong>(.*?)</strong>', webpage, 'average_rating', fatal=False)),
'comment_count': str_to_int(self._html_search_regex( \ 'comment_count': str_to_int(self._html_search_regex(
r'<span id="comCount">([0-9]+)</span>', webpage, 'comment_count', fatal=False)), r'<span id="comCount">([0-9]+)</span>', webpage, 'comment_count', fatal=False)),
'age_limit': 18, 'age_limit': 18,
'webpage_url': self._html_search_regex( \ 'webpage_url': self._html_search_regex(
r'name="link" value="(.*?)"', webpage, 'webpage_url', fatal=False), r'name="link" value="(.*?)"', webpage, 'webpage_url', fatal=False),
'categories': self._html_search_regex( \ 'categories': self._html_search_regex(
r'</div>\s*(.*?)\s*<br>', webpage, 'categories', fatal=False).split(', ') r'</div>\s*(.*?)\s*<br>', webpage, 'categories', fatal=False).split(', ')
} }