Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package you-get for openSUSE:Factory checked in at 2022-05-30 12:44:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/you-get (Old) and /work/SRC/openSUSE:Factory/.you-get.new.2254 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "you-get" Mon May 30 12:44:13 2022 rev:43 rq:979763 version:0.4.1612 Changes: -------- --- /work/SRC/openSUSE:Factory/you-get/you-get.changes 2022-04-23 19:49:07.971209223 +0200 +++ /work/SRC/openSUSE:Factory/.you-get.new.2254/you-get.changes 2022-05-30 12:45:11.452489587 +0200 @@ -1,0 +2,5 @@ +Mon May 30 03:58:14 UTC 2022 - Luigi Baldoni <aloi...@gmx.com> + +- Update to version 0.4.1612 (no changelog) + +------------------------------------------------------------------- Old: ---- you-get-0.4.1602.tar.gz New: ---- you-get-0.4.1612.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ you-get.spec ++++++ --- /var/tmp/diff_new_pack.bxPvL5/_old 2022-05-30 12:45:12.008490327 +0200 +++ /var/tmp/diff_new_pack.bxPvL5/_new 2022-05-30 12:45:12.012490332 +0200 @@ -17,7 +17,7 @@ Name: you-get -Version: 0.4.1602 +Version: 0.4.1612 Release: 0 Summary: Dumb downloader that scrapes the web License: MIT ++++++ you-get-0.4.1602.tar.gz -> you-get-0.4.1612.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/you-get-0.4.1602/.github/workflows/python-package.yml new/you-get-0.4.1612/.github/workflows/python-package.yml --- old/you-get-0.4.1602/.github/workflows/python-package.yml 2022-04-22 23:44:08.000000000 +0200 +++ new/you-get-0.4.1612/.github/workflows/python-package.yml 2022-05-30 01:44:36.000000000 +0200 @@ -16,7 +16,7 @@ strategy: fail-fast: false matrix: - python-version: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10", pypy3] + python-version: [3.7, 3.8, 3.9, '3.10', pypy-3.8, pypy-3.9] steps: - uses: actions/checkout@v2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/you-get-0.4.1602/README.md new/you-get-0.4.1612/README.md --- old/you-get-0.4.1602/README.md 2022-04-22 23:44:08.000000000 +0200 +++ new/you-get-0.4.1612/README.md 2022-05-30 01:44:36.000000000 +0200 @@ -4,7 +4,9 @@ [![PyPI version](https://img.shields.io/pypi/v/you-get.svg)](https://pypi.python.org/pypi/you-get/) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/soimort/you-get?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -**NOTICE: Read [this](https://github.com/soimort/you-get/blob/develop/CONTRIBUTING.md) if you are looking for the conventional "Issues" tab.** +**NOTICE (30 May 2022): Support for Python 3.5, 3.6 and 3.7 will eventually be dropped. ([see details here](https://github.com/soimort/you-get/wiki/TLS-1.3-post-handshake-authentication-(PHA)))** + +**NOTICE (8 Mar 2019): Read [this](https://github.com/soimort/you-get/blob/develop/CONTRIBUTING.md) if you are looking for the conventional "Issues" tab.** --- @@ -53,9 +55,9 @@ ### Prerequisites -The following dependencies are necessary: +The following dependencies are recommended: -* **[Python](https://www.python.org/downloads/)** 3.5 or above +* **[Python](https://www.python.org/downloads/)** 3.8 or above * **[FFmpeg](https://www.ffmpeg.org/)** 1.0 or above * (Optional) [RTMPDump](https://rtmpdump.mplayerhq.hu/) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/you-get-0.4.1602/src/you_get/common.py new/you-get-0.4.1612/src/you_get/common.py --- old/you-get-0.4.1602/src/you_get/common.py 2022-04-22 23:44:08.000000000 +0200 +++ new/you-get-0.4.1612/src/you_get/common.py 2022-05-30 01:44:36.000000000 +0200 @@ -344,7 +344,7 @@ # an http.client implementation of get_content() # because urllib does not support "Connection: keep-alive" -def getHttps(host, url, headers, debuglevel=0): +def getHttps(host, url, headers, gzip=True, deflate=False, debuglevel=0): import http.client conn = http.client.HTTPSConnection(host) @@ -353,8 +353,10 @@ resp = conn.getresponse() data = resp.read() - data = ungzip(data) - #data = undeflate(data) + if gzip: + data = ungzip(data) + if deflate: + data = undeflate(data) return str(data, encoding='utf-8') @@ -1654,7 +1656,7 @@ download_grp.add_argument('--itag', help=argparse.SUPPRESS) download_grp.add_argument('-m', '--m3u8', action='store_true', default=False, - help = 'download vide using an m3u8 url') + help = 'download video using an m3u8 url') parser.add_argument('URL', nargs='*', help=argparse.SUPPRESS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/you-get-0.4.1602/src/you_get/extractors/tiktok.py new/you-get-0.4.1612/src/you_get/extractors/tiktok.py --- old/you-get-0.4.1602/src/you_get/extractors/tiktok.py 2022-04-22 23:44:08.000000000 +0200 +++ new/you-get-0.4.1612/src/you_get/extractors/tiktok.py 2022-05-30 01:44:36.000000000 +0200 @@ -5,16 +5,6 @@ from ..common import * def tiktok_download(url, output_dir='.', merge=True, info_only=False, **kwargs): - while True: - m = re.match('https://([^/]+)(/.*)', url) - host = m.group(1) - if host == 'www.tiktok.com': # canonical URL reached - url = m.group(2).split('?')[0] - vid = url.split('/')[3] # should be a string of numbers - break - else: - url = get_location(url) - headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0', 'Accept-Encoding': 'gzip, deflate', @@ -22,7 +12,20 @@ 'Connection': 'keep-alive' # important } + m = re.match('(https?://)?([^/]+)(/.*)', url) + host = m.group(2) + if host != 'www.tiktok.com': # non-canonical URL + html = getHttps(host, url, headers=headers, gzip=False) + url = r1(r'(https://www.tiktok.com/[^?"]+)', html) + # use canonical URL + m = re.match('(https?://)?([^/]+)(/.*)', url) + host = m.group(2) + + url = m.group(3).split('?')[0] + vid = url.split('/')[3] # should be a string of numbers + html = getHttps(host, url, headers=headers) + data = r1(r'window\[\'SIGI_STATE\'\]=(.*?);window\[\'SIGI_RETRY\'\]', html) or \ r1(r'<script id="SIGI_STATE" type="application/json">(.*?)</script>', html) info = json.loads(data) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/you-get-0.4.1602/src/you_get/extractors/youtube.py new/you-get-0.4.1612/src/you_get/extractors/youtube.py --- old/you-get-0.4.1602/src/you_get/extractors/youtube.py 2022-04-22 23:44:08.000000000 +0200 +++ new/you-get-0.4.1612/src/you_get/extractors/youtube.py 2022-05-30 01:44:36.000000000 +0200 @@ -237,7 +237,7 @@ except: # ytplayer_config = {args:{raw_player_response:ytInitialPlayerResponse}} - ytInitialPlayerResponse = json.loads(re.search('ytInitialPlayerResponse\s*=\s*([^\n]+?});', video_page).group(1)) + ytInitialPlayerResponse = json.loads(re.search('ytInitialPlayerResponse\s*=\s*([^\n]+?});</script>', video_page).group(1)) stream_list = ytInitialPlayerResponse['streamingData']['formats'] #stream_list = ytInitialPlayerResponse['streamingData']['adaptiveFormats'] @@ -262,7 +262,7 @@ # Parse video page instead video_page = get_content('https://www.youtube.com/watch?v=%s' % self.vid) - ytInitialPlayerResponse = json.loads(re.search('ytInitialPlayerResponse\s*=\s*([^\n]+?});', video_page).group(1)) + ytInitialPlayerResponse = json.loads(re.search('ytInitialPlayerResponse\s*=\s*([^\n]+?});</script>', video_page).group(1)) self.title = ytInitialPlayerResponse["videoDetails"]["title"] if re.search('([^"]*/base\.js)"', video_page): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/you-get-0.4.1602/src/you_get/version.py new/you-get-0.4.1612/src/you_get/version.py --- old/you-get-0.4.1602/src/you_get/version.py 2022-04-22 23:44:08.000000000 +0200 +++ new/you-get-0.4.1612/src/you_get/version.py 2022-05-30 01:44:36.000000000 +0200 @@ -1,4 +1,4 @@ #!/usr/bin/env python script_name = 'you-get' -__version__ = '0.4.1602' +__version__ = '0.4.1612' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/you-get-0.4.1602/tests/test.py new/you-get-0.4.1612/tests/test.py --- old/you-get-0.4.1602/tests/test.py 2022-04-22 23:44:08.000000000 +0200 +++ new/you-get-0.4.1612/tests/test.py 2022-05-30 01:44:36.000000000 +0200 @@ -10,7 +10,8 @@ acfun, bilibili, soundcloud, - tiktok + tiktok, + twitter ) @@ -28,7 +29,7 @@ youtube.download( 'http://www.youtube.com/watch?v=pzKerr0JIPA', info_only=True ) - youtube.download('http://youtu.be/pzKerr0JIPA', info_only=True) + #youtube.download('http://youtu.be/pzKerr0JIPA', info_only=True) #youtube.download( # 'http://www.youtube.com/attribution_link?u=/watch?v%3DldAKIzq7bvs%26feature%3Dshare', # noqa # info_only=True @@ -57,6 +58,9 @@ tiktok.download('https://www.tiktok.com/@nmb48_official/video/6850796940293164290', info_only=True) tiktok.download('https://t.tiktok.com/i18n/share/video/6850796940293164290/', info_only=True) + def test_twitter(self): + twitter.download('https://twitter.com/elonmusk/status/1530516552084234244', info_only=True) + if __name__ == '__main__': unittest.main()