mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
[missevan] Skip danmaku download during dry run
This commit is contained in:
parent
272442e36d
commit
bbedf16d2d
@ -26,7 +26,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from ..common import get_content, urls_size, log, player
|
from ..common import get_content, urls_size, log, player, dry_run
|
||||||
from ..extractor import VideoExtractor
|
from ..extractor import VideoExtractor
|
||||||
|
|
||||||
_UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 ' \
|
_UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 ' \
|
||||||
@ -191,7 +191,7 @@ class MissEvan(VideoExtractor):
|
|||||||
log.e('付费资源无法下载')
|
log.e('付费资源无法下载')
|
||||||
return
|
return
|
||||||
|
|
||||||
if not is_covers_stream(kwargs.get('stream_id')):
|
if not is_covers_stream(kwargs.get('stream_id')) and not dry_run:
|
||||||
self.danmaku = self._get_content(self.url_danmaku_api(sid))
|
self.danmaku = self._get_content(self.url_danmaku_api(sid))
|
||||||
|
|
||||||
self.streams = self.setup_streams(sound)
|
self.streams = self.setup_streams(sound)
|
||||||
@ -256,12 +256,12 @@ class MissEvan(VideoExtractor):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
streams = self.setup_streams(sound)
|
streams = self.setup_streams(sound)
|
||||||
sound_id = sound['id']
|
extractor = MissEvanWithStream.create(sound_title, streams)
|
||||||
danmaku = self._get_content(self.url_danmaku_api(sound_id))
|
if not dry_run:
|
||||||
MissEvanWithStream \
|
sound_id = sound['id']
|
||||||
.create(sound_title, streams) \
|
danmaku = self._get_content(self.url_danmaku_api(sound_id))
|
||||||
.set_danmaku(danmaku) \
|
extractor.set_danmaku(danmaku)
|
||||||
.download(**kwargs)
|
extractor.download(**kwargs)
|
||||||
|
|
||||||
self.download_covers(sound_title, streams, **kwargs)
|
self.download_covers(sound_title, streams, **kwargs)
|
||||||
|
|
||||||
|
@ -24,7 +24,9 @@ class YouGetTests(unittest.TestCase):
|
|||||||
def test_missevan(self):
|
def test_missevan(self):
|
||||||
missevan.download('https://m.missevan.com/sound/1285995', info_only=True)
|
missevan.download('https://m.missevan.com/sound/1285995', info_only=True)
|
||||||
missevan.download_playlist(
|
missevan.download_playlist(
|
||||||
'https://www.missevan.com/albuminfo/287800', info_only=True)
|
'https://www.missevan.com/mdrama/drama/24130', info_only=True)
|
||||||
|
missevan.download_playlist(
|
||||||
|
'https://www.missevan.com/albuminfo/203090', info_only=True)
|
||||||
|
|
||||||
def test_youtube(self):
|
def test_youtube(self):
|
||||||
youtube.download(
|
youtube.download(
|
||||||
|
Loading…
Reference in New Issue
Block a user