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 2021-06-01 10:35:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/you-get (Old)
 and      /work/SRC/openSUSE:Factory/.you-get.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "you-get"

Tue Jun  1 10:35:09 2021 rev:37 rq:895197 version:0.4.1525

Changes:
--------
--- /work/SRC/openSUSE:Factory/you-get/you-get.changes  2021-04-01 
14:18:25.448083923 +0200
+++ /work/SRC/openSUSE:Factory/.you-get.new.1898/you-get.changes        
2021-06-01 10:35:38.568627240 +0200
@@ -1,0 +2,5 @@
+Mon May 24 14:58:14 UTC 2021 - Luigi Baldoni <aloi...@gmx.com>
+
+- Update to version 0.4.1525 (no changelog supplied)
+
+-------------------------------------------------------------------

Old:
----
  you-get-0.4.1520.tar.gz

New:
----
  you-get-0.4.1525.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ you-get.spec ++++++
--- /var/tmp/diff_new_pack.PwnZfY/_old  2021-06-01 10:35:39.088628125 +0200
+++ /var/tmp/diff_new_pack.PwnZfY/_new  2021-06-01 10:35:39.092628132 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           you-get
-Version:        0.4.1520
+Version:        0.4.1525
 Release:        0
 Summary:        Dumb downloader that scrapes the web
 License:        MIT

++++++ you-get-0.4.1520.tar.gz -> you-get-0.4.1525.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/you-get-0.4.1520/.github/workflows/python-package.yml 
new/you-get-0.4.1525/.github/workflows/python-package.yml
--- old/you-get-0.4.1520/.github/workflows/python-package.yml   2021-03-29 
16:44:07.000000000 +0200
+++ new/you-get-0.4.1525/.github/workflows/python-package.yml   2021-05-24 
15:43:24.000000000 +0200
@@ -15,7 +15,7 @@
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: [3.5, 3.6, 3.7, 3.8, pypy3]
+        python-version: [3.5, 3.6, 3.7, 3.8, 3.9, pypy3]
 
     steps:
     - uses: actions/checkout@v2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1520/src/you_get/extractors/bilibili.py 
new/you-get-0.4.1525/src/you_get/extractors/bilibili.py
--- old/you-get-0.4.1520/src/you_get/extractors/bilibili.py     2021-03-29 
16:44:07.000000000 +0200
+++ new/you-get-0.4.1525/src/you_get/extractors/bilibili.py     2021-05-24 
15:43:24.000000000 +0200
@@ -162,6 +162,11 @@
             self.url = 'https://www.bilibili.com/bangumi/play/ep%s' % ep_id
             html_content = get_content(self.url, 
headers=self.bilibili_headers(referer=self.url))
 
+        # redirect: s
+        elif re.match(r'https?://(www\.)?bilibili\.com/s/(.+)', self.url):
+            self.url = 'https://www.bilibili.com/%s' % match1(self.url, 
r'/s/(.+)')
+            html_content = get_content(self.url, 
headers=self.bilibili_headers())
+
         # sort it out
         if re.match(r'https?://(www\.)?bilibili\.com/audio/au(\d+)', self.url):
             sort = 'audio'
@@ -181,7 +186,7 @@
             self.download_playlist_by_url(self.url, **kwargs)
             return
 
-        # regular av video
+        # regular video
         if sort == 'video':
             initial_state_text = match1(html_content, 
r'__INITIAL_STATE__=(.*?);\(function\(\)')  # FIXME
             initial_state = json.loads(initial_state_text)
@@ -601,13 +606,21 @@
             log.e('[Error] Unsupported URL pattern.')
             exit(1)
 
-        # regular av video
+        # regular video
         if sort == 'video':
             initial_state_text = match1(html_content, 
r'__INITIAL_STATE__=(.*?);\(function\(\)')  # FIXME
             initial_state = json.loads(initial_state_text)
             aid = initial_state['videoData']['aid']
             pn = initial_state['videoData']['videos']
-            if pn!= len(initial_state['videoData']['pages']):#interaction 
video ????????????
+
+            if pn == len(initial_state['videoData']['pages']):
+                # non-interative video
+                for pi in range(1, pn + 1):
+                     purl = 'https://www.bilibili.com/video/av%s?p=%s' % (aid, 
pi)
+                     self.__class__().download_by_url(purl, **kwargs)
+
+            else:
+                # interative video
                 search_node_list = []
                 download_cid_set = set([initial_state['videoData']['cid']])
                 params = {
@@ -658,24 +671,6 @@
                                     self.streams_sorted = [dict([('itag', 
stream_type['itag'])] + list(self.streams[stream_type['itag']].items())) for 
stream_type in self.__class__.stream_types if stream_type['itag'] in 
self.streams]
                                 self.extract(**kwargs)
                                 self.download(**kwargs)
-            else:
-                playinfo_text = match1(html_content, 
r'__playinfo__=(.*?)</script><script>')  # FIXME
-                playinfo = json.loads(playinfo_text) if playinfo_text else None
-
-                html_content_ = get_content(self.url, 
headers=self.bilibili_headers(cookie='CURRENT_FNVAL=16'))
-                playinfo_text_ = match1(html_content_, 
r'__playinfo__=(.*?)</script><script>')  # FIXME
-                playinfo_ = json.loads(playinfo_text_) if playinfo_text_ else 
None
-                p = int(match1(self.url, r'[\?&]p=(\d+)') or match1(self.url, 
r'/index_(\d+)') or '1')-1
-                for pi in range(p,pn):
-                    
self.prepare_by_cid(aid,initial_state['videoData']['pages'][pi]['cid'],'%s 
(P%s. %s)' % (initial_state['videoData']['title'], pi+1, 
initial_state['videoData']['pages'][pi]['part']),html_content,playinfo,playinfo_,url)
-                    try:
-                        self.streams_sorted = [dict([('id', 
stream_type['id'])] + list(self.streams[stream_type['id']].items())) for 
stream_type in self.__class__.stream_types if stream_type['id'] in self.streams]
-                    except:
-                        self.streams_sorted = [dict([('itag', 
stream_type['itag'])] + list(self.streams[stream_type['itag']].items())) for 
stream_type in self.__class__.stream_types if stream_type['itag'] in 
self.streams]
-                    self.extract(**kwargs)
-                    self.download(**kwargs)
-                    # purl = 'https://www.bilibili.com/video/av%s?p=%s' % 
(aid, pi+1)
-                    # self.__class__().download_by_url(purl, **kwargs)
 
         elif sort == 'bangumi':
             initial_state_text = match1(html_content, 
r'__INITIAL_STATE__=(.*?);\(function\(\)')  # FIXME
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1520/src/you_get/extractors/youtube.py 
new/you-get-0.4.1525/src/you_get/extractors/youtube.py
--- old/you-get-0.4.1520/src/you_get/extractors/youtube.py      2021-03-29 
16:44:07.000000000 +0200
+++ new/you-get-0.4.1525/src/you_get/extractors/youtube.py      2021-05-24 
15:43:24.000000000 +0200
@@ -195,8 +195,9 @@
         # Get video info
         # 'eurl' is a magic parameter that can bypass age restriction
         # full form: 
'eurl=https%3A%2F%2Fyoutube.googleapis.com%2Fv%2F{VIDEO_ID}'
-        video_info = 
parse.parse_qs(get_content('https://www.youtube.com/get_video_info?video_id={}&eurl=https%3A%2F%2Fy'.format(self.vid)))
-        logging.debug('STATUS: %s' % video_info['status'][0])
+        #video_info = 
parse.parse_qs(get_content('https://www.youtube.com/get_video_info?video_id={}&eurl=https%3A%2F%2Fy'.format(self.vid)))
+        #logging.debug('STATUS: %s' % video_info['status'][0])
+        video_info = {'status': ['ok'], 'use_cipher_signature': 'True'}
 
         ytplayer_config = None
         if 'status' not in video_info:
@@ -253,11 +254,16 @@
             else:
                 # Parse video page instead
                 video_page = get_content('https://www.youtube.com/watch?v=%s' 
% self.vid)
-                ytplayer_config = 
json.loads(re.search('ytplayer.config\s*=\s*([^\n]+?});', video_page).group(1))
 
-                self.title = 
json.loads(ytplayer_config["args"]["player_response"])["videoDetails"]["title"]
-                self.html5player = 'https://www.youtube.com' + 
ytplayer_config['assets']['js']
-                stream_list = 
ytplayer_config['args']['url_encoded_fmt_stream_map'].split(',')
+                ytInitialPlayerResponse = 
json.loads(re.search('ytInitialPlayerResponse\s*=\s*([^\n]+?});', 
video_page).group(1))
+
+                self.title = ytInitialPlayerResponse["videoDetails"]["title"]
+                if re.search('([^"]*/base\.js)"', video_page):
+                    self.html5player = 'https://www.youtube.com' + 
re.search('([^"]*/base\.js)"', video_page).group(1)
+                else:
+                    self.html5player = None
+
+                stream_list = 
ytInitialPlayerResponse['streamingData']['formats']
 
         elif video_info['status'] == ['fail']:
             logging.debug('ERRORCODE: %s' % video_info['errorcode'][0])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1520/src/you_get/version.py 
new/you-get-0.4.1525/src/you_get/version.py
--- old/you-get-0.4.1520/src/you_get/version.py 2021-03-29 16:44:07.000000000 
+0200
+++ new/you-get-0.4.1525/src/you_get/version.py 2021-05-24 15:43:24.000000000 
+0200
@@ -1,4 +1,4 @@
 #!/usr/bin/env python
 
 script_name = 'you-get'
-__version__ = '0.4.1520'
+__version__ = '0.4.1525'

Reply via email to