Hello community,

here is the log from the commit of package you-get for openSUSE:Factory checked 
in at 2019-01-21 11:00:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/you-get (Old)
 and      /work/SRC/openSUSE:Factory/.you-get.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "you-get"

Mon Jan 21 11:00:14 2019 rev:17 rq:666976 version:0.4.1205

Changes:
--------
--- /work/SRC/openSUSE:Factory/you-get/you-get.changes  2018-12-18 
15:00:14.674083872 +0100
+++ /work/SRC/openSUSE:Factory/.you-get.new.28833/you-get.changes       
2019-01-21 11:02:06.207139481 +0100
@@ -1,0 +2,5 @@
+Fri Jan 18 12:38:55 UTC 2019 - Luigi Baldoni <[email protected]>
+
+- Update to version 0.4.1205 (no changelog supplied)
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ you-get.spec ++++++
--- /var/tmp/diff_new_pack.rL2LxI/_old  2019-01-21 11:02:06.663138893 +0100
+++ /var/tmp/diff_new_pack.rL2LxI/_new  2019-01-21 11:02:06.667138888 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package you-get
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,12 +12,12 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           you-get
-Version:        0.4.1193
+Version:        0.4.1205
 Release:        0
 Summary:        Dumb downloader that scrapes the web
 License:        MIT

++++++ you-get-0.4.1193.tar.gz -> you-get-0.4.1205.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1193/LICENSE.txt 
new/you-get-0.4.1205/LICENSE.txt
--- old/you-get-0.4.1193/LICENSE.txt    2018-12-17 12:07:56.000000000 +0100
+++ new/you-get-0.4.1205/LICENSE.txt    2019-01-18 12:26:57.000000000 +0100
@@ -1,15 +1,14 @@
-==============================================
-This is a copy of the MIT license.
-==============================================
-Copyright (C) 2012-2017 Mort Yao <[email protected]>
-Copyright (C) 2012 Boyu Guo <[email protected]>
+MIT License
 
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
+Copyright (c) 2012-2019 Mort Yao <[email protected]>
+Copyright (c) 2012 Boyu Guo <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
 
 The above copyright notice and this permission notice shall be included in all
 copies or substantial portions of the Software.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1193/src/you_get/common.py 
new/you-get-0.4.1205/src/you_get/common.py
--- old/you-get-0.4.1193/src/you_get/common.py  2018-12-17 12:07:56.000000000 
+0100
+++ new/you-get-0.4.1205/src/you_get/common.py  2019-01-18 12:26:57.000000000 
+0100
@@ -273,7 +273,15 @@
 def launch_player(player, urls):
     import subprocess
     import shlex
-    subprocess.call(shlex.split(player) + list(urls))
+    if (sys.version_info >= (3, 3)):
+        import shutil
+        exefile=shlex.split(player)[0]
+        if shutil.which(exefile) is not None:
+            subprocess.call(shlex.split(player) + list(urls))
+        else:
+            log.wtf('[Failed] Cannot find player "%s"' % exefile)
+    else:
+        subprocess.call(shlex.split(player) + list(urls))
 
 
 def parse_query_param(url, param):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1193/src/you_get/extractors/instagram.py 
new/you-get-0.4.1205/src/you_get/extractors/instagram.py
--- old/you-get-0.4.1193/src/you_get/extractors/instagram.py    2018-12-17 
12:07:56.000000000 +0100
+++ new/you-get-0.4.1205/src/you_get/extractors/instagram.py    2019-01-18 
12:26:57.000000000 +0100
@@ -29,14 +29,9 @@
                 image_url = edge['node']['display_url']
                 if 'video_url' in edge['node']:
                     image_url = edge['node']['video_url']
-                try:
-                    image_url = image_url.split('?')[0]
-                    ext = image_url.split('.')[-1]
-                    size = int(get_head(image_url)['Content-Length'])
-                except:
-                    image_url = image_url.split('?')[0] + 
'?_nc_ht=instagram.fcph1-1.fna.fbcdn.net'
-                    ext = image_url.split('.')[-1]
-                    size = int(get_head(image_url)['Content-Length'])
+                ext = image_url.split('?')[0].split('.')[-1]
+                size = int(get_head(image_url)['Content-Length'])
+
                 print_info(site_info, title, ext, size)
                 if not info_only:
                     download_urls(urls=[image_url],
@@ -49,14 +44,9 @@
             image_url = 
info['entry_data']['PostPage'][0]['graphql']['shortcode_media']['display_url']
             if 'video_url' in 
info['entry_data']['PostPage'][0]['graphql']['shortcode_media']:
                 image_url 
=info['entry_data']['PostPage'][0]['graphql']['shortcode_media']['video_url']
-            try:
-                image_url = image_url.split('?')[0]
-                ext = image_url.split('.')[-1]
-                size = int(get_head(image_url)['Content-Length'])
-            except:
-                image_url = image_url.split('?')[0] + 
'?_nc_ht=instagram.fcph1-1.fna.fbcdn.net'
-                ext = image_url.split('.')[-1]
-                size = int(get_head(image_url)['Content-Length'])
+            ext = image_url.split('?')[0].split('.')[-1]
+            size = int(get_head(image_url)['Content-Length'])
+
             print_info(site_info, title, ext, size)
             if not info_only:
                 download_urls(urls=[image_url],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1193/src/you_get/extractors/miaopai.py 
new/you-get-0.4.1205/src/you_get/extractors/miaopai.py
--- old/you-get-0.4.1193/src/you_get/extractors/miaopai.py      2018-12-17 
12:07:56.000000000 +0100
+++ new/you-get-0.4.1205/src/you_get/extractors/miaopai.py      2019-01-18 
12:26:57.000000000 +0100
@@ -67,7 +67,10 @@
 
 def miaopai_download_direct(url, info_only, **kwargs):
     mobile_page = get_content(url, headers=fake_headers_mobile)
-    title = re.search(r'([\'"])title\1:\s*([\'"])(.+?)\2,', 
mobile_page).group(3)
+    try:
+        title = re.search(r'([\'"])title\1:\s*([\'"])(.+?)\2,', 
mobile_page).group(3)
+    except:
+        title = re.search(r'([\'"])status_title\1:\s*([\'"])(.+?)\2,', 
mobile_page).group(3)
     title = title.replace('\n', '_')
     stream_url = re.search(r'([\'"])stream_url\1:\s*([\'"])(.+?)\2,', 
mobile_page).group(3)
     ext = 'mp4'
@@ -78,6 +81,9 @@
 
 # ----------------------------------------------------------------------
 def miaopai_download(url, output_dir = '.', merge = False, info_only = False, 
**kwargs):
+    if match1(url, r'weibo\.com/tv/v/(\w+)'):
+        return miaopai_download_direct(url, info_only=info_only, 
output_dir=output_dir, merge=merge, **kwargs)
+
     fid = match1(url, r'\?fid=(\d{4}:\w+)')
     if fid is not None:
         miaopai_download_by_fid(fid, output_dir, merge, info_only)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1193/src/you_get/extractors/naver.py 
new/you-get-0.4.1205/src/you_get/extractors/naver.py
--- old/you-get-0.4.1193/src/you_get/extractors/naver.py        2018-12-17 
12:07:56.000000000 +0100
+++ new/you-get-0.4.1205/src/you_get/extractors/naver.py        2019-01-18 
12:26:57.000000000 +0100
@@ -16,10 +16,15 @@
     ep = 'https://apis.naver.com/rmcnmv/rmcnmv/vod/play/v2.0/{}?key={}'
     page = get_content(url)
     try:
-        og_video_url = 
re.search(r"<meta\s+property=\"og:video:url\"\s+content='(.+?)'>", 
page).group(1)
-        params_dict = 
urllib.parse.parse_qs(urllib.parse.urlparse(og_video_url).query)
-        vid = params_dict['vid'][0]
-        key = params_dict['outKey'][0]
+        temp = 
re.search(r"<meta\s+property=\"og:video:url\"\s+content='(.+?)'>", page)
+        if temp is not None:
+            og_video_url = temp.group(1)
+            params_dict = 
urllib.parse.parse_qs(urllib.parse.urlparse(og_video_url).query)
+            vid = params_dict['vid'][0]
+            key = params_dict['outKey'][0]
+        else:
+            vid = re.search(r"\"videoId\"\s*:\s*\"(.+?)\"", page).group(1)
+            key = re.search(r"\"inKey\"\s*:\s*\"(.+?)\"", page).group(1)
         meta_str = get_content(ep.format(vid, key))
         meta_json = json.loads(meta_str)
         if 'errorCode' in meta_json:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1193/src/you_get/extractors/tiktok.py 
new/you-get-0.4.1205/src/you_get/extractors/tiktok.py
--- old/you-get-0.4.1193/src/you_get/extractors/tiktok.py       2018-12-17 
12:07:56.000000000 +0100
+++ new/you-get-0.4.1205/src/you_get/extractors/tiktok.py       2019-01-18 
12:26:57.000000000 +0100
@@ -5,7 +5,7 @@
 from ..common import *
 
 def tiktok_download(url, output_dir='.', merge=True, info_only=False, 
**kwargs):
-    html = get_html(url)
+    html = get_html(url, faker=True)
     title = r1(r'<title>(.*?)</title>', html)
     video_id = r1(r'/video/(\d+)', url) or r1(r'musical\?id=(\d+)', html)
     title = '%s [%s]' % (title, video_id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1193/src/you_get/extractors/tumblr.py 
new/you-get-0.4.1205/src/you_get/extractors/tumblr.py
--- old/you-get-0.4.1193/src/you_get/extractors/tumblr.py       2018-12-17 
12:07:56.000000000 +0100
+++ new/you-get-0.4.1205/src/you_get/extractors/tumblr.py       2019-01-18 
12:26:57.000000000 +0100
@@ -49,17 +49,18 @@
 
         tuggles = {}
         for url in urls:
-            filename = parse.unquote(url.split('/')[-1])
+            hd_url = r1(r'(.+)_\d+\.jpg$', url) + '_1280.jpg'  # FIXME: decide 
actual quality
+            filename = parse.unquote(hd_url.split('/')[-1])
             title = '.'.join(filename.split('.')[:-1])
             tumblr_id = r1(r'^tumblr_(.+)_\d+$', title)
             quality = int(r1(r'^tumblr_.+_(\d+)$', title))
             ext = filename.split('.')[-1]
             try:
-                size = int(get_head(url)['Content-Length'])
+                size = int(get_head(hd_url)['Content-Length'])
                 if tumblr_id not in tuggles or tuggles[tumblr_id]['quality'] < 
quality:
                     tuggles[tumblr_id] = {
                         'title': title,
-                        'url': url,
+                        'url': hd_url,
                         'quality': quality,
                         'ext': ext,
                         'size': size,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1193/src/you_get/extractors/universal.py 
new/you-get-0.4.1205/src/you_get/extractors/universal.py
--- old/you-get-0.4.1193/src/you_get/extractors/universal.py    2018-12-17 
12:07:56.000000000 +0100
+++ new/you-get-0.4.1205/src/you_get/extractors/universal.py    2019-01-18 
12:26:57.000000000 +0100
@@ -137,7 +137,8 @@
 
     else:
         # direct download
-        filename = parse.unquote(url.split('/')[-1]) or 
parse.unquote(url.split('/')[-2])
+        url_trunk = url.split('?')[0]  # strip query string
+        filename = parse.unquote(url_trunk.split('/')[-1]) or 
parse.unquote(url_trunk.split('/')[-2])
         title = '.'.join(filename.split('.')[:-1]) or filename
         _, ext, size = url_info(url, faker=True)
         print_info(site_info, title, ext, size)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1193/src/you_get/extractors/youtube.py 
new/you-get-0.4.1205/src/you_get/extractors/youtube.py
--- old/you-get-0.4.1193/src/you_get/extractors/youtube.py      2018-12-17 
12:07:56.000000000 +0100
+++ new/you-get-0.4.1205/src/you_get/extractors/youtube.py      2019-01-18 
12:26:57.000000000 +0100
@@ -41,6 +41,9 @@
         # - https://www.youtube.com/yts/jsbin/player-da_DK-vflWlK-zq/base.js
         # - https://www.youtube.com/yts/jsbin/player-vflvABTsY/da_DK/base.js
         # - https://www.youtube.com/yts/jsbin/player-vfls4aurX/da_DK/base.js
+        # - 
https://www.youtube.com/yts/jsbin/player_ias-vfl_RGK2l/en_US/base.js
+        # - https://www.youtube.com/yts/jsbin/player-vflRjqq_w/da_DK/base.js
+        # - 
https://www.youtube.com/yts/jsbin/player_ias-vfl-jbnrr/da_DK/base.js
         def tr_js(code):
             code = re.sub(r'function', r'def', code)
             code = re.sub(r'(\W)(as|if|in|is|or)\(', r'\1_\2(', code)
@@ -56,7 +59,8 @@
             return code
 
         js = js.replace('\n', ' ')
-        f1 = match1(js, 
r'\.set\(\w+\.sp,\(0,window\.encodeURIComponent\)\(([$\w]+)') or \
+        f1 = match1(js, r'\.set\(\w+\.sp,encodeURIComponent\(([$\w]+)') or \
+            match1(js, 
r'\.set\(\w+\.sp,\(0,window\.encodeURIComponent\)\(([$\w]+)') or \
             match1(js, r'\.set\(\w+\.sp,([$\w]+)\(\w+\.s\)\)') or \
             match1(js, r'"signature",([$\w]+)\(\w+\.\w+\)')
         f1def = match1(js, r'function %s(\(\w+\)\{[^\{]+\})' % re.escape(f1)) 
or \
@@ -225,7 +229,11 @@
 
         # YouTube Live
         if ytplayer_config and (ytplayer_config['args'].get('livestream') == 
'1' or ytplayer_config['args'].get('live_playback') == '1'):
-            hlsvp = ytplayer_config['args']['hlsvp']
+            if 'hlsvp' in ytplayer_config['args']:
+                hlsvp = ytplayer_config['args']['hlsvp']
+            else:
+                player_response= 
json.loads(ytplayer_config['args']['player_response'])
+                log.e('[Failed] %s' % 
player_response['playabilityStatus']['reason'], exit_code=1)
 
             if 'info_only' in kwargs and kwargs['info_only']:
                 return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1193/src/you_get/version.py 
new/you-get-0.4.1205/src/you_get/version.py
--- old/you-get-0.4.1193/src/you_get/version.py 2018-12-17 12:07:56.000000000 
+0100
+++ new/you-get-0.4.1205/src/you_get/version.py 2019-01-18 12:26:57.000000000 
+0100
@@ -1,4 +1,4 @@
 #!/usr/bin/env python
 
 script_name = 'you-get'
-__version__ = '0.4.1193'
+__version__ = '0.4.1205'


Reply via email to