From 5f2aac864256f66a3422a6f575dbfbab1505eab8 Mon Sep 17 00:00:00 2001 From: Urgau Date: Sun, 3 Jun 2018 11:24:41 +0200 Subject: [PATCH] Improve code convention --- youtube_dl/extractor/pbs.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/youtube_dl/extractor/pbs.py b/youtube_dl/extractor/pbs.py index 22f7736e6..1f047fbe2 100644 --- a/youtube_dl/extractor/pbs.py +++ b/youtube_dl/extractor/pbs.py @@ -456,8 +456,7 @@ class PBSIE(InfoExtractor): if not url: url = self._og_search_url(webpage) - if url.strip().startswith("//"): - url = "https:" + url.strip() + url = self._proto_relative_url(url.strip()) mobj = re.match(self._VALID_URL, url) player_id = mobj.group('player_id') @@ -467,13 +466,8 @@ class PBSIE(InfoExtractor): player_page = self._download_webpage( url, display_id, note='Downloading player page', errnote='Could not download player page') - - try: - video_id = self._search_regex( - r'