aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor/eighttracks.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-03-14 15:54:23 +0600
committerSergey M․ <dstftw@gmail.com>2015-03-14 15:54:23 +0600
commit05be67e77dcf5c2a87d0549f6ae0f805ce38f758 (patch)
treeb36357eec1d3750c792820daedda935ad118a962 /youtube_dl/extractor/eighttracks.py
parent85741b998660bfb1564ca2c02e233db42059be05 (diff)
downloadyoutube-dl-05be67e77dcf5c2a87d0549f6ae0f805ce38f758.zip
youtube-dl-05be67e77dcf5c2a87d0549f6ae0f805ce38f758.tar.gz
youtube-dl-05be67e77dcf5c2a87d0549f6ae0f805ce38f758.tar.bz2
[8tracks] Improve extraction
Diffstat (limited to 'youtube_dl/extractor/eighttracks.py')
-rw-r--r--youtube_dl/extractor/eighttracks.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/youtube_dl/extractor/eighttracks.py b/youtube_dl/extractor/eighttracks.py
index 869ff72..49ec2be 100644
--- a/youtube_dl/extractor/eighttracks.py
+++ b/youtube_dl/extractor/eighttracks.py
@@ -108,9 +108,10 @@ class EightTracksIE(InfoExtractor):
webpage = self._download_webpage(url, playlist_id)
- json_like = self._search_regex(
- r"(?s)PAGE.mix = (.*?);\n", webpage, 'trax information')
- data = json.loads(json_like)
+ data = self._parse_json(
+ self._search_regex(
+ r"(?s)PAGE\.mix\s*=\s*({.+?});\n", webpage, 'trax information'),
+ playlist_id)
session = str(random.randint(0, 1000000000))
mix_id = data['id']