mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-26 02:14:32 +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):
|
||||
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'<h1>(.+?)</h1>', webpage, 'title')
|
||||
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)
|
||||
@ -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'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user