From 4cf35c4bdb4121b7c49a875547e110cd18be9065 Mon Sep 17 00:00:00 2001 From: Allan Daemon Date: Mon, 15 May 2017 00:04:39 -0300 Subject: [PATCH 1/5] First PalcoMP3 implementation --- youtube_dl/extractor/extractors.py | 3 ++ youtube_dl/extractor/palcomp3.py | 69 ++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 youtube_dl/extractor/palcomp3.py diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index ed603eb29..f644d7569 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -745,6 +745,9 @@ from .packtpub import ( PacktPubIE, PacktPubCourseIE, ) +from .palcomp3 import ( + PalcoMP3IE +) from .pandatv import PandaTVIE from .pandoratv import PandoraTVIE from .parliamentliveuk import ParliamentLiveUKIE diff --git a/youtube_dl/extractor/palcomp3.py b/youtube_dl/extractor/palcomp3.py new file mode 100644 index 000000000..6ff5b0fce --- /dev/null +++ b/youtube_dl/extractor/palcomp3.py @@ -0,0 +1,69 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from ..compat import compat_etree_fromstring +from ..utils import get_element_by_id, get_element_by_attribute +from .common import InfoExtractor + +# TEMP FOR DEV +from pprint import pprint as pp + +class PalcoMP3IE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?palcomp3\.com/(?P[^/]+)/(?P[^/]+)' + _TEST = { + 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial/nossas-composicoes-cuida-bem-dela/', + 'md5': '0effca14d6640568df0c1daa1e5609e2', + 'info_dict': { + 'id': 'nossas-composicoes-cuida-bem-dela', + 'ext': 'mp3', + 'title': 'Nossas Composições - CUIDA BEM DELA', + 'thumbnail': r'https://studiosol-a.akamaihd.net/tb/468x351/palcomp3-logo/9/d/f/c/356447_20170324175145.jpg', + # TODO more properties, either as: + # * A value + # * MD5 checksum; start the string with md5: + # * A regular expression; start the string with re: + # * Any Python type (for example int or float) + } + } + + def _json_ld(self, json_ld, video_id, fatal=True, expected_type="MusicGroup"): + """ override `common.py:_json_ld` as we just need the + `_search_json_ld` function to get the JSON, but the original + `_json_ld` function does not fit us.""" + return self._parse_json(json_ld, video_id, fatal=fatal) + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + print ("Webpage", type(webpage), len(webpage)) + + + player = get_element_by_id('player', webpage) + # player = get_element_by_attribute('id', 'player', webpage, escape_value=False) + pp(player) + + + + ld = self._search_json_ld(player, video_id, expected_type="MusicGroup") + print("LD:") + pp(ld) + + # from IPython import embed + # embed() + info = self._ld_track_process(ld['track'][0]) + + return { + 'id': video_id, + 'title': self._og_search_title(webpage), + 'thumbnail': self._og_search_thumbnail(webpage), + # 'description': self._og_search_description(webpage), + # 'uploader': self._search_regex(r']+id="uploader"[^>]*>([^<]+)<', webpage, 'uploader', fatal=False), + # TODO more properties (see youtube_dl/extractor/common.py) + 'url': 'https:' + ld['track'][0]['audio'], + } + + + def _ld_track_process(self, track): + return { + 'url': 'https:' + track['audio'] + } \ No newline at end of file From 2c7edaf8f60a193439c2b3c0363045da3fe53c6b Mon Sep 17 00:00:00 2001 From: Allan Daemon Date: Mon, 15 May 2017 02:37:11 -0300 Subject: [PATCH 2/5] PalcoMP3: Getting song fine --- youtube_dl/extractor/palcomp3.py | 84 +++++++++++++++++++------------- 1 file changed, 49 insertions(+), 35 deletions(-) diff --git a/youtube_dl/extractor/palcomp3.py b/youtube_dl/extractor/palcomp3.py index 6ff5b0fce..16c238f43 100644 --- a/youtube_dl/extractor/palcomp3.py +++ b/youtube_dl/extractor/palcomp3.py @@ -1,6 +1,8 @@ # coding: utf-8 from __future__ import unicode_literals +import re + from ..compat import compat_etree_fromstring from ..utils import get_element_by_id, get_element_by_attribute from .common import InfoExtractor @@ -10,60 +12,72 @@ from pprint import pprint as pp class PalcoMP3IE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?palcomp3\.com/(?P[^/]+)/(?P[^/]+)' - _TEST = { + _TESTS = [{ 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial/nossas-composicoes-cuida-bem-dela/', - 'md5': '0effca14d6640568df0c1daa1e5609e2', + 'md5': '99fd6405b2d8fd589670f6db1ba3b358', 'info_dict': { - 'id': 'nossas-composicoes-cuida-bem-dela', + 'id': '3162927', 'ext': 'mp3', + 'display_id': 'nossas-composicoes-cuida-bem-dela', 'title': 'Nossas Composições - CUIDA BEM DELA', - 'thumbnail': r'https://studiosol-a.akamaihd.net/tb/468x351/palcomp3-logo/9/d/f/c/356447_20170324175145.jpg', - # TODO more properties, either as: - # * A value - # * MD5 checksum; start the string with md5: - # * A regular expression; start the string with re: - # * Any Python type (for example int or float) - } - } + 'thumbnail': r'https://studiosol-a.akamaihd.net/tb/80x60/palcomp3-logo/9/d/f/c/356447_20170324175145.jpg', + }}, + { + 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial/niveis-da-bebida/', + 'md5': '4c4d1e45b5ae49396cfff017eb41cdd9', + 'info_dict': { + 'id': '2303899', + 'ext': 'mp3', + 'display_id': 'niveis-da-bebida', + 'title': 'NIVEIS DA BEBIDA', + 'thumbnail': r'https://studiosol-a.akamaihd.net/tb/80x60/palcomp3-logo/9/d/f/c/356447_20170324175145.jpg', + }}, + ] - def _json_ld(self, json_ld, video_id, fatal=True, expected_type="MusicGroup"): + def _json_ld(self, json_ld, display_id, fatal=True, expected_type="MusicGroup"): """ override `common.py:_json_ld` as we just need the `_search_json_ld` function to get the JSON, but the original `_json_ld` function does not fit us.""" - return self._parse_json(json_ld, video_id, fatal=fatal) + return self._parse_json(json_ld, display_id, fatal=fatal) def _real_extract(self, url): - video_id = self._match_id(url) - webpage = self._download_webpage(url, video_id) + display_id = self._match_id(url) + webpage = self._download_webpage(url, display_id) print ("Webpage", type(webpage), len(webpage)) + ld = self._get_ld_info(webpage, display_id) + tracks = [ self._ld_track_process(track, ld) for track in ld['track'] ] + + # from IPython import embed + # embed() + for track in tracks: + if track['display_id'] == display_id: + return track - player = get_element_by_id('player', webpage) + + def _get_ld_info(self, webpage, display_id): # player = get_element_by_attribute('id', 'player', webpage, escape_value=False) + player = get_element_by_id('player', webpage) pp(player) - - - ld = self._search_json_ld(player, video_id, expected_type="MusicGroup") + ld = self._search_json_ld(player, display_id, expected_type="MusicGroup") print("LD:") pp(ld) - # from IPython import embed - # embed() - info = self._ld_track_process(ld['track'][0]) + return ld + + def _ld_track_process(self, track, ld={'genre':None}): + tmin, tsec = re.findall("PT(\d+)M(\d+)S", track['duration'], re.IGNORECASE)[0] return { - 'id': video_id, - 'title': self._og_search_title(webpage), - 'thumbnail': self._og_search_thumbnail(webpage), - # 'description': self._og_search_description(webpage), - # 'uploader': self._search_regex(r']+id="uploader"[^>]*>([^<]+)<', webpage, 'uploader', fatal=False), - # TODO more properties (see youtube_dl/extractor/common.py) - 'url': 'https:' + ld['track'][0]['audio'], - } - - - def _ld_track_process(self, track): - return { - 'url': 'https:' + track['audio'] + 'id': track['@id'], + 'title': track['name'], + 'track': track['name'], + 'url': 'https:' + track['audio'], + 'webpage_url': 'https://www.palcomp3.com' + track['url'], + 'artist': track['byArtist']['name'], + 'thumbnail': track['byArtist']['image'], + 'display_id': track['url'].split('/')[-2], + 'duration': int(tmin)*60 + int(tsec), + 'genre': ld['genre'], } \ No newline at end of file From da47b154b812c6cc0db3668234319bbd6e7f6df3 Mon Sep 17 00:00:00 2001 From: Allan Daemon Date: Mon, 15 May 2017 04:40:20 -0300 Subject: [PATCH 3/5] Add PalcoMP3 Video extractor --- youtube_dl/extractor/extractors.py | 4 +- youtube_dl/extractor/palcomp3.py | 122 ++++++++++++++++++++++++++--- 2 files changed, 113 insertions(+), 13 deletions(-) diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index f644d7569..7062f14cd 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -746,7 +746,9 @@ from .packtpub import ( PacktPubCourseIE, ) from .palcomp3 import ( - PalcoMP3IE + PalcoMP3IE, + PalcoMP3ArtistIE, + PalcoMP3VideoIE, ) from .pandatv import PandaTVIE from .pandoratv import PandoraTVIE diff --git a/youtube_dl/extractor/palcomp3.py b/youtube_dl/extractor/palcomp3.py index 16c238f43..c526293ac 100644 --- a/youtube_dl/extractor/palcomp3.py +++ b/youtube_dl/extractor/palcomp3.py @@ -11,7 +11,8 @@ from .common import InfoExtractor from pprint import pprint as pp class PalcoMP3IE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?palcomp3\.com/(?P[^/]+)/(?P[^/]+)' + IE_NAME = 'PalcoMP3:song' + _VALID_URL = r'https?://(?:www\.)?palcomp3\.com/(?P[^/]+)/(?P[^/]+)/?$' _TESTS = [{ 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial/nossas-composicoes-cuida-bem-dela/', 'md5': '99fd6405b2d8fd589670f6db1ba3b358', @@ -23,7 +24,7 @@ class PalcoMP3IE(InfoExtractor): 'thumbnail': r'https://studiosol-a.akamaihd.net/tb/80x60/palcomp3-logo/9/d/f/c/356447_20170324175145.jpg', }}, { - 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial/niveis-da-bebida/', + 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial/niveis-da-bebida', 'md5': '4c4d1e45b5ae49396cfff017eb41cdd9', 'info_dict': { 'id': '2303899', @@ -40,19 +41,27 @@ class PalcoMP3IE(InfoExtractor): `_json_ld` function does not fit us.""" return self._parse_json(json_ld, display_id, fatal=fatal) - def _real_extract(self, url): - display_id = self._match_id(url) - webpage = self._download_webpage(url, display_id) - print ("Webpage", type(webpage), len(webpage)) - ld = self._get_ld_info(webpage, display_id) + def _extract_common(self, url): + artist_id = self._VALID_URL_RE.match(url).group('artist') + webpage = self._download_webpage(url, artist_id) + print ("Webpage", type(webpage), len(webpage)) + self.webpage = webpage + + ld = self._get_ld_info(webpage, artist_id) tracks = [ self._ld_track_process(track, ld) for track in ld['track'] ] - - # from IPython import embed - # embed() + + return tracks, ld, webpage + + def _real_extract(self, url, with_webpage=False): + display_id = self._match_id(url) + tracks, ld, webpage = self._extract_common(url) for track in tracks: if track['display_id'] == display_id: - return track + if with_webpage: + return track, webpage + else: + return track def _get_ld_info(self, webpage, display_id): @@ -80,4 +89,93 @@ class PalcoMP3IE(InfoExtractor): 'display_id': track['url'].split('/')[-2], 'duration': int(tmin)*60 + int(tsec), 'genre': ld['genre'], - } \ No newline at end of file + } + + +class PalcoMP3ArtistIE(PalcoMP3IE): + IE_NAME = 'PalcoMP3:artist' + _VALID_URL = r'https?://(?:www\.)?palcomp3\.com/(?P[^/]+)/?$' + _TESTS = [ + { + 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial', + 'info_dict': { + 'id': 'maiaraemaraisaoficial', + 'title': 'Maiara e Maraisa Oficial', + }, + 'playlist_count': 8, + }, + { + 'url': 'https://www.palcomp3.com/banda5cha/', + 'info_dict': { + 'id': 'banda5cha', + 'title': '5Chá', + }, + 'playlist_count': 2, + }, + ] + + def _real_extract(self, url): + tracks, ld, _ = self._extract_common(url) + return self.playlist_result(tracks, ld['name'], ld['description']) + + +class PalcoMP3VideoIE(PalcoMP3IE): + IE_NAME = 'PalcoMP3:video' + _VALID_URL = r'https?://(?:www\.)?palcomp3\.com/(?P[^/]+)/(?P[^/]+)/#clipe$' + _TESTS = [ + { + 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial/maiara-e-maraisa-voce-faz-falta-aqui-ao-vivo-em-vicosa-mg/#clipe', + 'add_ie': ['Youtube'], + 'info_dict': { + 'id': '_pD1nR2qqPg', + 'ext': 'mp4', + 'title': 'Maiara e Maraisa - Você Faz Falta Aqui - DVD Ao Vivo Em Campo Grande', + 'description': 'md5:739d585d094212b999e507377daa21de', + 'upload_date': '20161107', + 'uploader_id': 'maiaramaraisaoficial', + 'uploader': 'Maiara e Maraisa', + }}, + { + 'url': 'https://www.palcomp3.com/mckevinho/dog-vagabundo-mc-phe-cachorrera-part-mc-kevinho/#clipe', + 'add_ie': ['Youtube'], + 'info_dict': { + 'id': 'iKVAfp6-o-Q', + 'ext': 'mp4', + 'title': 'MC Phe Cachorrera e MC Kevinho - Dog Vagabundo (Video Clipe) Jorgin Deejhay / HDUC ep.2', + 'description': 'md5:728024b6905a9a321c8c16e1e1985e56', + 'upload_date': '20170208', + 'uploader': 'GR6 EXPLODE', + 'uploader_id': 'gr6explode', + }}, + ] + + def _real_extract(self, url): + track, webpage = super(PalcoMP3VideoIE, self)._real_extract(url, with_webpage=True) + print "TRACK" + pp(track) + + video_re = r""" + (?x) +
  • + + ([^<]*?)
  • + """.format(track['id']) + + m = re.search(video_re, webpage) + + # from IPython import embed + # embed() + + if not m: + return None + + video_id = m.group('video_id') + + return { + '_type': 'url_transparent', + 'ie_key': 'Youtube', + 'id': video_id, + 'url': video_id, + } From 6a84bb616c37e023b522c3e56c02c30fc117fe76 Mon Sep 17 00:00:00 2001 From: Allan Daemon Date: Thu, 18 May 2017 03:38:20 -0300 Subject: [PATCH 4/5] finishing; need to clean up --- youtube_dl/extractor/palcomp3.py | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/youtube_dl/extractor/palcomp3.py b/youtube_dl/extractor/palcomp3.py index c526293ac..dc33a1562 100644 --- a/youtube_dl/extractor/palcomp3.py +++ b/youtube_dl/extractor/palcomp3.py @@ -96,14 +96,6 @@ class PalcoMP3ArtistIE(PalcoMP3IE): IE_NAME = 'PalcoMP3:artist' _VALID_URL = r'https?://(?:www\.)?palcomp3\.com/(?P[^/]+)/?$' _TESTS = [ - { - 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial', - 'info_dict': { - 'id': 'maiaraemaraisaoficial', - 'title': 'Maiara e Maraisa Oficial', - }, - 'playlist_count': 8, - }, { 'url': 'https://www.palcomp3.com/banda5cha/', 'info_dict': { @@ -112,6 +104,24 @@ class PalcoMP3ArtistIE(PalcoMP3IE): }, 'playlist_count': 2, }, + { + 'url': 'https://www.palcomp3.com/kleijohnata/', + 'info_dict': { + 'id': 'kleijohnata', + 'title': 'KLEIJOHNATA ', + }, + 'playlist_count': 4, + }, + + # Active famous artist; Very likely to change the playlist a lot + # { + # 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial', + # 'info_dict': { + # 'id': 'maiaraemaraisaoficial', + # 'title': 'Maiara e Maraisa Oficial', + # }, + # 'playlist_count': '>8', + # }, ] def _real_extract(self, url): From 586fd077de5d9da4d702794bd7734b7943453a24 Mon Sep 17 00:00:00 2001 From: Allan Daemon Date: Thu, 18 May 2017 04:16:38 -0300 Subject: [PATCH 5/5] Fix flask8 issues. Ready to pull --- youtube_dl/extractor/palcomp3.py | 108 +++++++++++++------------------ 1 file changed, 46 insertions(+), 62 deletions(-) diff --git a/youtube_dl/extractor/palcomp3.py b/youtube_dl/extractor/palcomp3.py index dc33a1562..94c3d91dc 100644 --- a/youtube_dl/extractor/palcomp3.py +++ b/youtube_dl/extractor/palcomp3.py @@ -3,12 +3,9 @@ from __future__ import unicode_literals import re -from ..compat import compat_etree_fromstring from ..utils import get_element_by_id, get_element_by_attribute from .common import InfoExtractor -# TEMP FOR DEV -from pprint import pprint as pp class PalcoMP3IE(InfoExtractor): IE_NAME = 'PalcoMP3:song' @@ -41,15 +38,13 @@ class PalcoMP3IE(InfoExtractor): `_json_ld` function does not fit us.""" return self._parse_json(json_ld, display_id, fatal=fatal) - def _extract_common(self, url): artist_id = self._VALID_URL_RE.match(url).group('artist') webpage = self._download_webpage(url, artist_id) - print ("Webpage", type(webpage), len(webpage)) self.webpage = webpage ld = self._get_ld_info(webpage, artist_id) - tracks = [ self._ld_track_process(track, ld) for track in ld['track'] ] + tracks = [self._ld_track_process(track, ld) for track in ld['track']] return tracks, ld, webpage @@ -63,19 +58,13 @@ class PalcoMP3IE(InfoExtractor): else: return track - def _get_ld_info(self, webpage, display_id): - # player = get_element_by_attribute('id', 'player', webpage, escape_value=False) - player = get_element_by_id('player', webpage) - pp(player) - + player = get_element_by_id('player', webpage) or \ + get_element_by_attribute('id', 'player', webpage, escape_value=False) ld = self._search_json_ld(player, display_id, expected_type="MusicGroup") - print("LD:") - pp(ld) - return ld - def _ld_track_process(self, track, ld={'genre':None}): + def _ld_track_process(self, track, ld={'genre': None}): tmin, tsec = re.findall("PT(\d+)M(\d+)S", track['duration'], re.IGNORECASE)[0] return { @@ -87,7 +76,7 @@ class PalcoMP3IE(InfoExtractor): 'artist': track['byArtist']['name'], 'thumbnail': track['byArtist']['image'], 'display_id': track['url'].split('/')[-2], - 'duration': int(tmin)*60 + int(tsec), + 'duration': int(tmin) * 60 + int(tsec), 'genre': ld['genre'], } @@ -97,30 +86,30 @@ class PalcoMP3ArtistIE(PalcoMP3IE): _VALID_URL = r'https?://(?:www\.)?palcomp3\.com/(?P[^/]+)/?$' _TESTS = [ { - 'url': 'https://www.palcomp3.com/banda5cha/', - 'info_dict': { - 'id': 'banda5cha', - 'title': '5Chá', + 'url': 'https://www.palcomp3.com/banda5cha/', + 'info_dict': { + 'id': 'banda5cha', + 'title': '5Chá', }, - 'playlist_count': 2, + 'playlist_count': 2, }, { - 'url': 'https://www.palcomp3.com/kleijohnata/', - 'info_dict': { - 'id': 'kleijohnata', - 'title': 'KLEIJOHNATA ', + 'url': 'https://www.palcomp3.com/kleijohnata/', + 'info_dict': { + 'id': 'kleijohnata', + 'title': 'KLEIJOHNATA ', }, - 'playlist_count': 4, + 'playlist_count': 4, }, - # Active famous artist; Very likely to change the playlist a lot + # Active famous artist; Very likely to change playlist_count. # { - # 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial', - # 'info_dict': { - # 'id': 'maiaraemaraisaoficial', - # 'title': 'Maiara e Maraisa Oficial', + # 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial', + # 'info_dict': { + # 'id': 'maiaraemaraisaoficial', + # 'title': 'Maiara e Maraisa Oficial', # }, - # 'playlist_count': '>8', + # 'playlist_count': 8, # }, ] @@ -134,35 +123,35 @@ class PalcoMP3VideoIE(PalcoMP3IE): _VALID_URL = r'https?://(?:www\.)?palcomp3\.com/(?P[^/]+)/(?P[^/]+)/#clipe$' _TESTS = [ { - 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial/maiara-e-maraisa-voce-faz-falta-aqui-ao-vivo-em-vicosa-mg/#clipe', - 'add_ie': ['Youtube'], - 'info_dict': { - 'id': '_pD1nR2qqPg', - 'ext': 'mp4', - 'title': 'Maiara e Maraisa - Você Faz Falta Aqui - DVD Ao Vivo Em Campo Grande', - 'description': 'md5:739d585d094212b999e507377daa21de', - 'upload_date': '20161107', - 'uploader_id': 'maiaramaraisaoficial', - 'uploader': 'Maiara e Maraisa', - }}, + 'url': 'https://www.palcomp3.com/maiaraemaraisaoficial/maiara-e-maraisa-voce-faz-falta-aqui-ao-vivo-em-vicosa-mg/#clipe', + 'add_ie': ['Youtube'], + 'info_dict': { + 'id': '_pD1nR2qqPg', + 'ext': 'mp4', + 'title': 'Maiara e Maraisa - Você Faz Falta Aqui - DVD Ao Vivo Em Campo Grande', + 'description': 'md5:739d585d094212b999e507377daa21de', + 'upload_date': '20161107', + 'uploader_id': 'maiaramaraisaoficial', + 'uploader': 'Maiara e Maraisa', + } + }, { - 'url': 'https://www.palcomp3.com/mckevinho/dog-vagabundo-mc-phe-cachorrera-part-mc-kevinho/#clipe', - 'add_ie': ['Youtube'], - 'info_dict': { - 'id': 'iKVAfp6-o-Q', - 'ext': 'mp4', - 'title': 'MC Phe Cachorrera e MC Kevinho - Dog Vagabundo (Video Clipe) Jorgin Deejhay / HDUC ep.2', - 'description': 'md5:728024b6905a9a321c8c16e1e1985e56', - 'upload_date': '20170208', - 'uploader': 'GR6 EXPLODE', - 'uploader_id': 'gr6explode', - }}, + 'url': 'https://www.palcomp3.com/mckevinho/dog-vagabundo-mc-phe-cachorrera-part-mc-kevinho/#clipe', + 'add_ie': ['Youtube'], + 'info_dict': { + 'id': 'iKVAfp6-o-Q', + 'ext': 'mp4', + 'title': 'MC Phe Cachorrera e MC Kevinho - Dog Vagabundo (Video Clipe) Jorgin Deejhay / HDUC ep.2', + 'description': 'md5:728024b6905a9a321c8c16e1e1985e56', + 'upload_date': '20170208', + 'uploader': 'GR6 EXPLODE', + 'uploader_id': 'gr6explode', + } + }, ] def _real_extract(self, url): track, webpage = super(PalcoMP3VideoIE, self)._real_extract(url, with_webpage=True) - print "TRACK" - pp(track) video_re = r""" (?x) @@ -173,14 +162,9 @@ class PalcoMP3VideoIE(PalcoMP3IE): ([^<]*?) """.format(track['id']) - m = re.search(video_re, webpage) - - # from IPython import embed - # embed() - + m = re.search(video_re, webpage) if not m: return None - video_id = m.group('video_id') return {