mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
[embed] add dailymotion patterns
This commit is contained in:
parent
251857407b
commit
a534c11e94
@ -5,6 +5,7 @@ import urllib.parse
|
||||
from ..common import *
|
||||
|
||||
from .bilibili import bilibili_download
|
||||
from .dailymotion import dailymotion_download
|
||||
from .iqiyi import iqiyi_download_by_vid
|
||||
from .le import letvcloud_download_by_vu
|
||||
from .netease import netease_download
|
||||
@ -47,6 +48,8 @@ netease_embed_patterns = [ '(http://\w+\.163\.com/movie/[^\'"]+)' ]
|
||||
|
||||
vimeo_embed_patters = [ 'player\.vimeo\.com/video/(\d+)' ]
|
||||
|
||||
dailymotion_embed_patterns = [ 'www\.dailymotion\.com/embed/video/(\w+)' ]
|
||||
|
||||
"""
|
||||
check the share button on http://www.bilibili.com/video/av5079467/
|
||||
"""
|
||||
@ -99,6 +102,11 @@ def embed_download(url, output_dir = '.', merge = True, info_only = False ,**kwa
|
||||
found = True
|
||||
vimeo_download_by_id(url, title=title, output_dir=output_dir, merge=merge, info_only=info_only, referer=url)
|
||||
|
||||
urls = matchall(content, dailymotion_embed_patterns)
|
||||
for url in urls:
|
||||
found = True
|
||||
dailymotion_download(url, title=title, output_dir=output_dir, merge=merge, info_only=info_only)
|
||||
|
||||
aids = matchall(content, bilibili_embed_patterns)
|
||||
for aid in aids:
|
||||
found = True
|
||||
|
Loading…
Reference in New Issue
Block a user