mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
[missevan] Show and skip paid resource
This commit is contained in:
parent
9a3c5a912d
commit
272442e36d
@ -187,6 +187,10 @@ class MissEvan(VideoExtractor):
|
|||||||
sound = json_data['info']['sound']
|
sound = json_data['info']['sound']
|
||||||
|
|
||||||
self.title = sound['soundstr']
|
self.title = sound['soundstr']
|
||||||
|
if sound.get('need_pay'):
|
||||||
|
log.e('付费资源无法下载')
|
||||||
|
return
|
||||||
|
|
||||||
if not is_covers_stream(kwargs.get('stream_id')):
|
if not is_covers_stream(kwargs.get('stream_id')):
|
||||||
self.danmaku = self._get_content(self.url_danmaku_api(sid))
|
self.danmaku = self._get_content(self.url_danmaku_api(sid))
|
||||||
|
|
||||||
@ -246,9 +250,13 @@ class MissEvan(VideoExtractor):
|
|||||||
kwargs['output_dir'] = output_dir
|
kwargs['output_dir'] = output_dir
|
||||||
|
|
||||||
for sound in sounds:
|
for sound in sounds:
|
||||||
|
sound_title = sound['soundstr']
|
||||||
|
if sound.get('need_pay'):
|
||||||
|
log.w('跳过付费资源: ' + sound_title)
|
||||||
|
continue
|
||||||
|
|
||||||
streams = self.setup_streams(sound)
|
streams = self.setup_streams(sound)
|
||||||
sound_id = sound['id']
|
sound_id = sound['id']
|
||||||
sound_title = sound['soundstr']
|
|
||||||
danmaku = self._get_content(self.url_danmaku_api(sound_id))
|
danmaku = self._get_content(self.url_danmaku_api(sound_id))
|
||||||
MissEvanWithStream \
|
MissEvanWithStream \
|
||||||
.create(sound_title, streams) \
|
.create(sound_title, streams) \
|
||||||
@ -263,6 +271,8 @@ class MissEvan(VideoExtractor):
|
|||||||
json_data = self._get_json(self.url_drama_api(did))
|
json_data = self._get_json(self.url_drama_api(did))
|
||||||
|
|
||||||
drama = json_data['info']['drama']
|
drama = json_data['info']['drama']
|
||||||
|
if drama.get('need_pay'):
|
||||||
|
log.w('该剧集包含付费资源, 付费资源将被跳过')
|
||||||
|
|
||||||
self.title = drama['name']
|
self.title = drama['name']
|
||||||
output_dir = os.path.abspath(kwargs.pop('output_dir', '.'))
|
output_dir = os.path.abspath(kwargs.pop('output_dir', '.'))
|
||||||
@ -271,6 +281,9 @@ class MissEvan(VideoExtractor):
|
|||||||
|
|
||||||
episodes = json_data['info']['episodes']
|
episodes = json_data['info']['episodes']
|
||||||
for each in episodes['episode']:
|
for each in episodes['episode']:
|
||||||
|
if each.get('need_pay'):
|
||||||
|
log.w('跳过付费资源: ' + each['soundstr'])
|
||||||
|
continue
|
||||||
sound_id = each['sound_id']
|
sound_id = each['sound_id']
|
||||||
MissEvan().download_by_vid(sound_id, **kwargs)
|
MissEvan().download_by_vid(sound_id, **kwargs)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user