From 137ad3763bdde9c1f079f2d7ff66ca25f2df3952 Mon Sep 17 00:00:00 2001 From: kopalniadolow <31770041+kopalniadolow@users.noreply.github.com> Date: Sat, 9 Sep 2017 15:16:10 +0200 Subject: [PATCH] Update tokfm.py In 25 line server require text data not json --- youtube_dl/extractor/tokfm.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/tokfm.py b/youtube_dl/extractor/tokfm.py index c068bec17..559c68b16 100644 --- a/youtube_dl/extractor/tokfm.py +++ b/youtube_dl/extractor/tokfm.py @@ -20,7 +20,6 @@ class TOKFMIE(InfoExtractor): def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) - # TODO more code goes here, for example ... title = self._html_search_regex(r'

(.+?)

', webpage, 'title') description = self._html_search_regex(r'
(.+?)
', webpage, None) js = self._download_json('http://audycje.tokfm.pl/gets', video_id, data='{"pid": %s, "st": "tokfm"}' % video_id) @@ -28,6 +27,6 @@ class TOKFMIE(InfoExtractor): 'id': video_id, 'title': title, 'description': description, - 'url': js['url'] - # TODO more properties (see youtube_dl/extractor/common.py) + 'url': js['url'], + 'ext': 'mp3' }