Skip to content

Commit

Permalink
YinYueTai: fix video type
Browse files Browse the repository at this point in the history
  • Loading branch information
soimort committed Sep 6, 2014
1 parent a5e7b65 commit 9626080
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/you_get/extractors/yinyuetai.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
def yinyuetai_download_by_id(id, title = None, output_dir = '.', merge = True, info_only = False):
assert title
html = get_html('http://www.yinyuetai.com/insite/get-video-info?flex=true&videoId=' + id)

for quality in ['he\w*', 'hd\w*', 'hc\w*', '\w+']:
url = r1(r'(http://' + quality + '\.yinyuetai\.com/uploads/videos/common/\w+\.(?:flv|mp4)\?(?:sc=[a-f0-9]{16}|v=\d{12}))', html)
if url:
break
assert url
type, ext, size = url_info(url)

type = ext = r1(r'\.(flv|mp4)', url)
_, _, size = url_info(url)

print_info(site_info, title, type, size)
if not info_only:
download_urls([url], title, ext, size, output_dir, merge = merge)
Expand Down

0 comments on commit 9626080

Please sign in to comment.