mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-23 00:54:31 +01:00
Update tokfm.py
In 25 line server require text data not json
This commit is contained in:
parent
5e5a835962
commit
137ad3763b
@ -20,7 +20,6 @@ class TOKFMIE(InfoExtractor):
|
|||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
# TODO more code goes here, for example ...
|
|
||||||
title = self._html_search_regex(r'<h1>(.+?)</h1>', webpage, 'title')
|
title = self._html_search_regex(r'<h1>(.+?)</h1>', webpage, 'title')
|
||||||
description = self._html_search_regex(r'<div class=content>(.+?)</div>', webpage, None)
|
description = self._html_search_regex(r'<div class=content>(.+?)</div>', webpage, None)
|
||||||
js = self._download_json('http://audycje.tokfm.pl/gets', video_id, data='{"pid": %s, "st": "tokfm"}' % video_id)
|
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,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': description,
|
'description': description,
|
||||||
'url': js['url']
|
'url': js['url'],
|
||||||
# TODO more properties (see youtube_dl/extractor/common.py)
|
'ext': 'mp3'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user