Skip to content

Commit

Permalink
Fixed issues #24503 #10687 and checked style with flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Wang authored and Wang committed Apr 21, 2020
1 parent b466ffb commit 5949ac4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions youtube_dl/extractor/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
update_url_query,
)


class ABCIE(InfoExtractor):
IE_NAME = 'abc.net.au'
_VALID_URL = r'https?://(?:www\.)?abc\.net\.au/news/(?:[^/]+/){1,2}(?P<id>\d+)'
Expand Down Expand Up @@ -73,12 +74,11 @@ def _real_extract(self, url):

youtube_link = self._html_search_regex(r'(?s)a href="http://www.youtube.com/(.+?)"', webpage, 'youtube_link', None)
if youtube_link:
youtube_link = "http://www.youtube.com/"+youtube_link
youtube_link = "http://www.youtube.com/" + youtube_link
return self.url_result(youtube_link)

if mobj is None:
expired = self._html_search_regex(r'(?s)class="expired-(?:video|audio)".+?<span>(.+?)</span>', webpage, 'expired', None)


if expired:
raise ExtractorError('%s said: %s' % (self.IE_NAME, expired), expected=True)
Expand All @@ -90,7 +90,6 @@ def _real_extract(self, url):
if not isinstance(urls_info, list):
urls_info = [urls_info]


if mobj.group('type') == 'YouTube':
return self.playlist_result([
self.url_result(url_info['url']) for url_info in urls_info])
Expand Down
6 changes: 3 additions & 3 deletions youtube_dl/extractor/espn.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ class ESPNIE(OnceIE):
}, {
'url': 'http://www.espn.com/espnw/video/26066627/arkansas-gibson-completes-hr-cycle-four-innings',
'only_matching': True,
},{
}, {
'url': 'https://www.espn.co.uk/video/clip/_/id/25103188',
'only_matching': True,
},{
}, {
'url': 'https://www.espn.co.uk/video/clip/_/id/29069602',
'only_matching': True,
},{
}, {
'url': 'https://www.espn.co.uk/video/clip/_/id/19367162',
'only_matching': True,
}]
Expand Down

0 comments on commit 5949ac4

Please sign in to comment.