Hello community, here is the log from the commit of package you-get for openSUSE:Factory checked in at 2019-09-25 08:49:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/you-get (Old) and /work/SRC/openSUSE:Factory/.you-get.new.7948 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "you-get" Wed Sep 25 08:49:10 2019 rev:26 rq:733000 version:0.4.1355 Changes: -------- --- /work/SRC/openSUSE:Factory/you-get/you-get.changes 2019-09-11 10:33:36.059327452 +0200 +++ /work/SRC/openSUSE:Factory/.you-get.new.7948/you-get.changes 2019-09-25 08:49:14.314216724 +0200 @@ -1,0 +2,5 @@ +Tue Sep 24 16:16:55 UTC 2019 - Luigi Baldoni <[email protected]> + +- Update to version 0.4.1355 (no changelog supplied) + +------------------------------------------------------------------- Old: ---- you-get-0.4.1347.tar.gz New: ---- you-get-0.4.1355.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ you-get.spec ++++++ --- /var/tmp/diff_new_pack.mSrJNU/_old 2019-09-25 08:49:14.926216642 +0200 +++ /var/tmp/diff_new_pack.mSrJNU/_new 2019-09-25 08:49:14.926216642 +0200 @@ -17,7 +17,7 @@ Name: you-get -Version: 0.4.1347 +Version: 0.4.1355 Release: 0 Summary: Dumb downloader that scrapes the web License: MIT ++++++ you-get-0.4.1347.tar.gz -> you-get-0.4.1355.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/you-get-0.4.1347/src/you_get/extractors/acfun.py new/you-get-0.4.1355/src/you_get/extractors/acfun.py --- old/you-get-0.4.1347/src/you_get/extractors/acfun.py 2019-09-09 23:14:04.000000000 +0200 +++ new/you-get-0.4.1355/src/you_get/extractors/acfun.py 2019-09-24 13:44:06.000000000 +0200 @@ -124,9 +124,8 @@ m3u8_url = json_data.get('currentVideoInfo')['playInfos'][0]['playUrls'][0] - # FIXME: bangumi elif re.match("https?://[^\.]*\.*acfun\.[^\.]+/bangumi/ab(\d+)", url): - html = get_content(url) + html = get_content(url, headers=fake_headers) tag_script = match1(html, r'<script>window\.pageInfo([^<]+)</script>') json_text = tag_script[tag_script.find('{') : tag_script.find('};') + 1] json_data = json.loads(json_text) @@ -134,6 +133,19 @@ vid = str(json_data['videoId']) up = "acfun" + play_info = get_content("https://www.acfun.cn/rest/pc-direct/play/playInfo/m3u8Auto?videoId=" + vid, headers=fake_headers) + play_url = json.loads(play_info)['playInfo']['streams'][0]['playUrls'][0] + m3u8_all_qualities_file = get_content(play_url) + m3u8_all_qualities_lines = m3u8_all_qualities_file.split('#EXT-X-STREAM-INF:')[1:] + highest_quality_line = m3u8_all_qualities_lines[0] + for line in m3u8_all_qualities_lines: + bandwith = int(match1(line, r'BANDWIDTH=(\d+)')) + if bandwith > int(match1(highest_quality_line, r'BANDWIDTH=(\d+)')): + highest_quality_line = line + #TODO: 应由用户指定清晰度 + m3u8_url = match1(highest_quality_line, r'\n([^#\n]+)$') + m3u8_url = play_url[:play_url.rfind("/")+1] + m3u8_url + else: raise NotImplemented diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/you-get-0.4.1347/src/you_get/extractors/bilibili.py new/you-get-0.4.1355/src/you_get/extractors/bilibili.py --- old/you-get-0.4.1347/src/you_get/extractors/bilibili.py 2019-09-09 23:14:04.000000000 +0200 +++ new/you-get-0.4.1355/src/you_get/extractors/bilibili.py 2019-09-24 13:44:06.000000000 +0200 @@ -45,7 +45,7 @@ def bilibili_headers(referer=None, cookie=None): # a reasonable UA ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36' - headers = {'Accept': '*/*', 'User-Agent': ua} + headers = {'Accept': '*/*', 'Accept-Language': 'en-US,en;q=0.5', 'User-Agent': ua} if referer is not None: headers.update({'Referer': referer}) if cookie is not None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/you-get-0.4.1347/src/you_get/extractors/ixigua.py new/you-get-0.4.1355/src/you_get/extractors/ixigua.py --- old/you-get-0.4.1347/src/you_get/extractors/ixigua.py 2019-09-09 23:14:04.000000000 +0200 +++ new/you-get-0.4.1355/src/you_get/extractors/ixigua.py 2019-09-24 13:44:06.000000000 +0200 @@ -82,7 +82,7 @@ # example url: https://www.ixigua.com/i6631065141750268420/#mid=63024814422 html = get_html(url, faker=True) video_id = match1(html, r"\"vid\":\"([^\"]+)") - title = match1(html, r"\"player__videoTitle\"><h1>(.*)<\/h1><\/div>") + title = match1(html, r"\"player__videoTitle\">.*?<h1.*?>(.*)<\/h1><\/div>") if not video_id: log.e("video_id not found, url:{}".format(url)) return diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/you-get-0.4.1347/src/you_get/json_output.py new/you-get-0.4.1355/src/you_get/json_output.py --- old/you-get-0.4.1347/src/you_get/json_output.py 2019-09-09 23:14:04.000000000 +0200 +++ new/you-get-0.4.1355/src/you_get/json_output.py 2019-09-24 13:44:06.000000000 +0200 @@ -12,6 +12,11 @@ out['site'] = ve.name out['streams'] = ve.streams try: + if ve.dash_streams: + out['streams'].update(ve.dash_streams) + except AttributeError: + pass + try: if ve.audiolang: out['audiolang'] = ve.audiolang except AttributeError: @@ -59,4 +64,3 @@ ve.streams = {} ve.streams['__default__'] = stream output(ve) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/you-get-0.4.1347/src/you_get/version.py new/you-get-0.4.1355/src/you_get/version.py --- old/you-get-0.4.1347/src/you_get/version.py 2019-09-09 23:14:04.000000000 +0200 +++ new/you-get-0.4.1355/src/you_get/version.py 2019-09-24 13:44:06.000000000 +0200 @@ -1,4 +1,4 @@ #!/usr/bin/env python script_name = 'you-get' -__version__ = '0.4.1347' +__version__ = '0.4.1355'
