mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-01-07 17:16:08 +00:00
[chirbit:profile] Fix extraction
This commit is contained in:
parent
62a0b86e4f
commit
2ecbd2ad6f
|
@ -1,6 +1,7 @@
|
||||||
version <unreleased>
|
version <unreleased>
|
||||||
|
|
||||||
Extractors
|
Extractors
|
||||||
|
* [chirbit] Fix extraction of user profile pages
|
||||||
* [charambatv] Fix extraction
|
* [charambatv] Fix extraction
|
||||||
* [canalplus] Fix extraction for some videos
|
* [canalplus] Fix extraction for some videos
|
||||||
* [cbsinteractive] Fix extraction for cnet.com
|
* [cbsinteractive] Fix extraction for cnet.com
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import parse_duration
|
from ..utils import parse_duration
|
||||||
|
@ -70,7 +71,6 @@ class ChirbitProfileIE(InfoExtractor):
|
||||||
'url': 'http://chirbit.com/ScarletBeauty',
|
'url': 'http://chirbit.com/ScarletBeauty',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'ScarletBeauty',
|
'id': 'ScarletBeauty',
|
||||||
'title': 'Chirbits by ScarletBeauty',
|
|
||||||
},
|
},
|
||||||
'playlist_mincount': 3,
|
'playlist_mincount': 3,
|
||||||
}
|
}
|
||||||
|
@ -78,13 +78,10 @@ class ChirbitProfileIE(InfoExtractor):
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
profile_id = self._match_id(url)
|
profile_id = self._match_id(url)
|
||||||
|
|
||||||
rss = self._download_xml(
|
webpage = self._download_webpage(url, profile_id)
|
||||||
'http://chirbit.com/rss/%s' % profile_id, profile_id)
|
|
||||||
|
|
||||||
entries = [
|
entries = [
|
||||||
self.url_result(audio_url.text, 'Chirbit')
|
self.url_result(self._proto_relative_url('//chirb.it/' + video_id))
|
||||||
for audio_url in rss.findall('./channel/item/link')]
|
for _, video_id in re.findall(r'<input[^>]+id=([\'"])copy-btn-(?P<id>[0-9a-zA-Z]+)\1', webpage)]
|
||||||
|
|
||||||
title = rss.find('./channel/title').text
|
return self.playlist_result(entries, profile_id)
|
||||||
|
|
||||||
return self.playlist_result(entries, profile_id, title)
|
|
||||||
|
|
Loading…
Reference in a new issue