mirror of
https://github.com/soimort/you-get.git
synced 2025-01-24 05:55:02 +03:00
[common] add .ac.cn support
This commit is contained in:
parent
d3d9e0f5c0
commit
08fdd22466
@ -75,6 +75,7 @@ SITES = {
|
||||
'tumblr' : 'tumblr',
|
||||
'twimg' : 'twitter',
|
||||
'twitter' : 'twitter',
|
||||
'ucas' : 'ucas',
|
||||
'videomega' : 'videomega',
|
||||
'vidto' : 'vidto',
|
||||
'vimeo' : 'vimeo',
|
||||
@ -1412,7 +1413,7 @@ def url_to_module(url):
|
||||
video_host = 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]
|
||||
domain = r1(r'(\.[^.]+\.[^.]+)$', video_host) or video_host
|
||||
assert domain, 'unsupported url: ' + url
|
||||
|
Loading…
Reference in New Issue
Block a user