0
0
Fork 0

[8tracks] Improve extraction

main
Sergey M․ 2015-03-14 15:54:23 +06:00
parent 85741b9986
commit 05be67e77d
1 changed files with 4 additions and 3 deletions

View File

@ -108,9 +108,10 @@ class EightTracksIE(InfoExtractor):
webpage = self._download_webpage(url, playlist_id) webpage = self._download_webpage(url, playlist_id)
json_like = self._search_regex( data = self._parse_json(
r"(?s)PAGE.mix = (.*?);\n", webpage, 'trax information') self._search_regex(
data = json.loads(json_like) r"(?s)PAGE\.mix\s*=\s*({.+?});\n", webpage, 'trax information'),
playlist_id)
session = str(random.randint(0, 1000000000)) session = str(random.randint(0, 1000000000))
mix_id = data['id'] mix_id = data['id']