mirror of
https://github.com/soimort/you-get.git
synced 2025-03-15 04:13:58 +03:00
[common] add .ac.cn support
This commit is contained in:
parent
d3d9e0f5c0
commit
08fdd22466
@ -75,6 +75,7 @@ SITES = {
|
|||||||
'tumblr' : 'tumblr',
|
'tumblr' : 'tumblr',
|
||||||
'twimg' : 'twitter',
|
'twimg' : 'twitter',
|
||||||
'twitter' : 'twitter',
|
'twitter' : 'twitter',
|
||||||
|
'ucas' : 'ucas',
|
||||||
'videomega' : 'videomega',
|
'videomega' : 'videomega',
|
||||||
'vidto' : 'vidto',
|
'vidto' : 'vidto',
|
||||||
'vimeo' : 'vimeo',
|
'vimeo' : 'vimeo',
|
||||||
@ -1412,7 +1413,7 @@ def url_to_module(url):
|
|||||||
video_host = r1(r'https?://([^/]+)/', url)
|
video_host = r1(r'https?://([^/]+)/', url)
|
||||||
video_url = r1(r'https?://[^/]+(.*)', url)
|
video_url = r1(r'https?://[^/]+(.*)', url)
|
||||||
|
|
||||||
if video_host.endswith('.com.cn'):
|
if video_host.endswith('.com.cn') or video_host.endswith('.ac.cn'):
|
||||||
video_host = video_host[:-3]
|
video_host = video_host[:-3]
|
||||||
domain = r1(r'(\.[^.]+\.[^.]+)$', video_host) or video_host
|
domain = r1(r'(\.[^.]+\.[^.]+)$', video_host) or video_host
|
||||||
assert domain, 'unsupported url: ' + url
|
assert domain, 'unsupported url: ' + url
|
||||||
|
Loading…
x
Reference in New Issue
Block a user