mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
Merge branch 'master' of https://github.com/flewsea/you-get into flewsea-master
This commit is contained in:
commit
60806658d8
@ -27,6 +27,9 @@ def iwara_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
|||||||
api_url = video_url + '/api/video/' + video_hash
|
api_url = video_url + '/api/video/' + video_hash
|
||||||
content = get_content(api_url, headers=headers)
|
content = get_content(api_url, headers=headers)
|
||||||
data = json.loads(content)
|
data = json.loads(content)
|
||||||
|
if len(data)<1 :
|
||||||
|
print('Maybe is Private Video?'+'['+title+']')
|
||||||
|
return True;
|
||||||
down_urls = 'https:' + data[0]['uri']
|
down_urls = 'https:' + data[0]['uri']
|
||||||
type, ext, size = url_info(down_urls, headers=headers)
|
type, ext, size = url_info(down_urls, headers=headers)
|
||||||
print_info(site_info, title+data[0]['resolution'], type, size)
|
print_info(site_info, title+data[0]['resolution'], type, size)
|
||||||
@ -35,10 +38,8 @@ def iwara_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
|||||||
download_urls([down_urls], title, ext, size, output_dir, merge=merge, headers=headers)
|
download_urls([down_urls], title, ext, size, output_dir, merge=merge, headers=headers)
|
||||||
|
|
||||||
def download_playlist_by_url( url, **kwargs):
|
def download_playlist_by_url( url, **kwargs):
|
||||||
video_page = get_content(url)
|
video_page = get_html(url)
|
||||||
# url_first=re.findall(r"(http[s]?://[^/]+)",url)
|
|
||||||
url_first=match1(url, r"(http[s]?://[^/]+)")
|
url_first=match1(url, r"(http[s]?://[^/]+)")
|
||||||
# print (url_first)
|
|
||||||
videos = set(re.findall(r'<a href="(/videos/[^"]+)"', video_page))
|
videos = set(re.findall(r'<a href="(/videos/[^"]+)"', video_page))
|
||||||
if(len(videos)>0):
|
if(len(videos)>0):
|
||||||
for video in videos:
|
for video in videos:
|
||||||
|
Loading…
Reference in New Issue
Block a user