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 2025-01-05 15:31:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/you-get (Old)
 and      /work/SRC/openSUSE:Factory/.you-get.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "you-get"

Sun Jan  5 15:31:31 2025 rev:51 rq:1234889 version:0.4.1743

Changes:
--------
--- /work/SRC/openSUSE:Factory/you-get/you-get.changes  2024-08-20 
16:14:08.460020028 +0200
+++ /work/SRC/openSUSE:Factory/.you-get.new.1881/you-get.changes        
2025-01-05 15:31:46.695050239 +0100
@@ -1,0 +2,9 @@
+Sat Jan  4 08:42:32 UTC 2025 - Luigi Baldoni <aloi...@gmx.com>
+
+- Update to version 0.4.1743
+  * [YouTube] Fix extraction
+  * Fix: Restore functionality of -o parameter for Miaopai
+    downloads
+  * remove imported but unsed module
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ you-get.spec ++++++
--- /var/tmp/diff_new_pack.llL71m/_old  2025-01-05 15:31:47.187070476 +0100
+++ /var/tmp/diff_new_pack.llL71m/_new  2025-01-05 15:31:47.187070476 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package you-get
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           you-get
-Version:        0.4.1730
+Version:        0.4.1743
 Release:        0
 Summary:        Dumb downloader that scrapes the web
 License:        MIT

++++++ you-get-0.4.1730.tar.gz -> you-get-0.4.1743.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/you-get-0.4.1730/.github/workflows/python-package.yml 
new/you-get-0.4.1743/.github/workflows/python-package.yml
--- old/you-get-0.4.1730/.github/workflows/python-package.yml   2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/.github/workflows/python-package.yml   2025-01-04 
02:50:35.000000000 +0100
@@ -15,12 +15,12 @@
     strategy:
       fail-fast: false
       matrix:
-        python-version: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12', pypy-3.8, 
pypy-3.9, pypy-3.10]
+        python-version: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12', '3.13', 
pypy-3.8, pypy-3.9, pypy-3.10]
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v4
+      uses: actions/setup-python@v5
       with:
         python-version: ${{ matrix.python-version }}
     - name: Install dependencies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/acfun.py 
new/you-get-0.4.1743/src/you_get/extractors/acfun.py
--- old/you-get-0.4.1730/src/you_get/extractors/acfun.py        2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/acfun.py        2025-01-04 
02:50:35.000000000 +0100
@@ -43,7 +43,7 @@
             currentVideoInfo = json_data.get('currentVideoInfo')
 
         else:
-            raise NotImplemented            
+            raise NotImplementedError()         
 
         if 'ksPlayJson' in currentVideoInfo:
             durationMillis = currentVideoInfo['durationMillis']
@@ -193,7 +193,7 @@
             m3u8_url = getM3u8UrlFromCurrentVideoInfo(currentVideoInfo)
 
         else:
-            raise NotImplemented
+            raise NotImplementedError()
 
         assert title and m3u8_url
         title = unescape_html(title)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/baidu.py 
new/you-get-0.4.1743/src/you_get/extractors/baidu.py
--- old/you-get-0.4.1730/src/you_get/extractors/baidu.py        2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/baidu.py        2025-01-04 
02:50:35.000000000 +0100
@@ -185,7 +185,7 @@
     isprotected = False
     sign, timestamp, bdstoken, appid, primary_id, fs_id, uk = baidu_pan_parse(
         html)
-    if sign == None:
+    if sign is None:
         if re.findall(r'\baccess-code\b', html):
             isprotected = True
             sign, timestamp, bdstoken, appid, primary_id, fs_id, uk, 
fake_headers, psk = baidu_pan_protected_share(
@@ -193,7 +193,7 @@
             # raise NotImplementedError("Password required!")
         if isprotected != True:
             raise AssertionError("Share not found or canceled: %s" % url)
-    if bdstoken == None:
+    if bdstoken is None:
         bdstoken = ""
     if isprotected != True:
         sign, timestamp, bdstoken, appid, primary_id, fs_id, uk = 
baidu_pan_parse(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/facebook.py 
new/you-get-0.4.1743/src/you_get/extractors/facebook.py
--- old/you-get-0.4.1730/src/you_get/extractors/facebook.py     2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/facebook.py     2025-01-04 
02:50:35.000000000 +0100
@@ -3,7 +3,6 @@
 __all__ = ['facebook_download']
 
 from ..common import *
-import json
 
 def facebook_download(url, output_dir='.', merge=True, info_only=False, 
**kwargs):
     url = re.sub(r'//.*?facebook.com','//facebook.com',url)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/fc2video.py 
new/you-get-0.4.1743/src/you_get/extractors/fc2video.py
--- old/you-get-0.4.1730/src/you_get/extractors/fc2video.py     2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/fc2video.py     2025-01-04 
02:50:35.000000000 +0100
@@ -5,7 +5,6 @@
 from ..common import *
 from hashlib import md5
 from urllib.parse import urlparse
-import re
 
 #----------------------------------------------------------------------
 def makeMimi(upid):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/giphy.py 
new/you-get-0.4.1743/src/you_get/extractors/giphy.py
--- old/you-get-0.4.1730/src/you_get/extractors/giphy.py        2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/giphy.py        2025-01-04 
02:50:35.000000000 +0100
@@ -3,7 +3,6 @@
 __all__ = ['giphy_download']
 
 from ..common import *
-import json
 
 def giphy_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
     html = get_html(url)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/iqiyi.py 
new/you-get-0.4.1743/src/you_get/extractors/iqiyi.py
--- old/you-get-0.4.1730/src/you_get/extractors/iqiyi.py        2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/iqiyi.py        2025-01-04 
02:50:35.000000000 +0100
@@ -10,7 +10,6 @@
 from random import random,randint
 import json
 from math import floor
-from zlib import decompress
 import hashlib
 import time
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/ixigua.py 
new/you-get-0.4.1743/src/you_get/extractors/ixigua.py
--- old/you-get-0.4.1730/src/you_get/extractors/ixigua.py       2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/ixigua.py       2025-01-04 
02:50:35.000000000 +0100
@@ -1,12 +1,7 @@
 #!/usr/bin/env python
 import base64
 
-import binascii
-
 from ..common import *
-import random
-import string
-import ctypes
 from json import loads
 from urllib import request
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/kuaishou.py 
new/you-get-0.4.1743/src/you_get/extractors/kuaishou.py
--- old/you-get-0.4.1730/src/you_get/extractors/kuaishou.py     2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/kuaishou.py     2025-01-04 
02:50:35.000000000 +0100
@@ -2,10 +2,8 @@
 
 import urllib.request
 import urllib.parse
-import json
 import re
 
-from ..util import log
 from ..common import get_content, download_urls, print_info, 
playlist_not_supported, url_size
 
 __all__ = ['kuaishou_download_by_url']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/kugou.py 
new/you-get-0.4.1743/src/you_get/extractors/kugou.py
--- old/you-get-0.4.1730/src/you_get/extractors/kugou.py        2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/kugou.py        2025-01-04 
02:50:35.000000000 +0100
@@ -6,7 +6,6 @@
 from json import loads
 from base64 import b64decode
 import re
-import hashlib
 
 
 def kugou_download(url, output_dir=".", merge=True, info_only=False, **kwargs):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/miaopai.py 
new/you-get-0.4.1743/src/you_get/extractors/miaopai.py
--- old/you-get-0.4.1730/src/you_get/extractors/miaopai.py      2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/miaopai.py      2025-01-04 
02:50:35.000000000 +0100
@@ -37,7 +37,7 @@
         download_urls([url], title, ext, total_size=None, 
output_dir=output_dir, merge=merge)
 
 
-def miaopai_download_by_wbmp(wbmp_url, fid, info_only=False, **kwargs):
+def miaopai_download_by_wbmp(wbmp_url, fid, output_dir='.', merge=False, 
info_only=False, **kwargs):
     headers = {}
     headers.update(fake_headers_mobile)
     headers['Host'] = 'imgaliyuncdn.miaopai.com'
@@ -62,7 +62,7 @@
     headers['Host'] = 'f.us.sinaimg.cn'
     print_info(site_info, title, ext, url_info(video_url, headers=headers)[2])
     if not info_only:
-        download_urls([video_url], fs.legitimize(title), ext, headers=headers, 
**kwargs)
+        download_urls([video_url], fs.legitimize(title), ext, 
output_dir=output_dir, headers=headers, **kwargs)
 
 
 def miaopai_download_story(url, output_dir='.', merge=False, info_only=False, 
**kwargs):
@@ -75,7 +75,7 @@
     ext = 'mp4'
     print_info(site_info, title, ext, url_info(stream_url, 
headers=fake_headers_mobile)[2])
     if not info_only:
-        download_urls([stream_url], fs.legitimize(title), ext, 
total_size=None, headers=fake_headers_mobile, **kwargs)
+        download_urls([stream_url], fs.legitimize(title), ext, 
total_size=None, output_dir=output_dir, headers=fake_headers_mobile, **kwargs)
 
 
 def miaopai_download_h5api(url, output_dir='.', merge=False, info_only=False, 
**kwargs):
@@ -122,7 +122,7 @@
 
     print_info(site_info, title, ext, size)
     if not info_only:
-        download_urls([video_url], fs.legitimize(title), ext, total_size=size, 
headers=headers, **kwargs)
+        download_urls([video_url], fs.legitimize(title), ext, total_size=size, 
output_dir=output_dir, headers=headers, **kwargs)
 
 
 def miaopai_download_direct(url, output_dir='.', merge=False, info_only=False, 
**kwargs):
@@ -141,7 +141,7 @@
     ext = 'mp4'
     print_info(site_info, title, ext, url_info(stream_url, 
headers=fake_headers_mobile)[2])
     if not info_only:
-        download_urls([stream_url], fs.legitimize(title), ext, 
total_size=None, headers=fake_headers_mobile, **kwargs)
+        download_urls([stream_url], fs.legitimize(title), ext, 
total_size=None, output_dir=output_dir, headers=fake_headers_mobile, **kwargs)
 
 
 def miaopai_download(url, output_dir='.', merge=False, info_only=False, 
**kwargs):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/pixnet.py 
new/you-get-0.4.1743/src/you_get/extractors/pixnet.py
--- old/you-get-0.4.1730/src/you_get/extractors/pixnet.py       2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/pixnet.py       2025-01-04 
02:50:35.000000000 +0100
@@ -3,7 +3,6 @@
 __all__ = ['pixnet_download']
 
 from ..common import *
-import urllib.error
 from time import time
 from urllib.parse import quote
 from json import loads
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/sohu.py 
new/you-get-0.4.1743/src/you_get/extractors/sohu.py
--- old/you-get-0.4.1730/src/you_get/extractors/sohu.py 2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/sohu.py 2025-01-04 
02:50:35.000000000 +0100
@@ -5,9 +5,6 @@
 from ..common import *
 
 import json
-import time
-from random import random
-from urllib.parse import urlparse
 
 '''
 Changelog:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/you-get-0.4.1730/src/you_get/extractors/soundcloud.py 
new/you-get-0.4.1743/src/you_get/extractors/soundcloud.py
--- old/you-get-0.4.1730/src/you_get/extractors/soundcloud.py   2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/soundcloud.py   2025-01-04 
02:50:35.000000000 +0100
@@ -5,7 +5,6 @@
 from ..common import *
 import re
 import json
-import urllib.error
 
 
 def get_sndcd_apikey():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/suntv.py 
new/you-get-0.4.1743/src/you_get/extractors/suntv.py
--- old/you-get-0.4.1730/src/you_get/extractors/suntv.py        2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/suntv.py        2025-01-04 
02:50:35.000000000 +0100
@@ -27,7 +27,6 @@
         html = html.decode('gbk')
         title = match1(html, '<title>([^<]+)').strip()  #get rid of \r\n s
         
-        type_ = ''
         size = 0
         type, ext, size = url_info(video_url)
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/twitter.py 
new/you-get-0.4.1743/src/you_get/extractors/twitter.py
--- old/you-get-0.4.1730/src/you_get/extractors/twitter.py      2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/twitter.py      2025-01-04 
02:50:35.000000000 +0100
@@ -15,6 +15,12 @@
     return ['https://video.twimg.com%s' % i for i in s2]
 
 def twitter_download(url, output_dir='.', merge=True, info_only=False, 
**kwargs):
+    headers = {
+        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) 
Gecko/20100101 Firefox/88.0',
+        'Accept-Encoding': 'gzip, deflate',
+        'Accept': '*/*'
+    }
+
     if re.match(r'https?://pbs\.twimg\.com', url):
         universal_download(url, output_dir, merge=merge, info_only=info_only, 
**kwargs)
         return
@@ -52,7 +58,7 @@
             photo_url = photo['url']
             title = item_id + '_' + photo_url.split('.')[-2].split('/')[-1]
             urls = [ photo_url + ':orig' ]
-            size = urls_size(urls)
+            size = urls_size(urls, headers=headers)
             ext = photo_url.split('.')[-1]
 
             print_info(site_info, title, ext, size)
@@ -66,12 +72,12 @@
             variants = sorted(variants, key=lambda kv: kv.get('bitrate', 0))
             title = item_id + '_' + 
variants[-1]['url'].split('/')[-1].split('?')[0].split('.')[0]
             urls = [ variants[-1]['url'] ]
-            size = urls_size(urls)
+            size = urls_size(urls, headers=headers)
             mime, ext = variants[-1]['content_type'], 'mp4'
 
             print_info(site_info, title, ext, size)
             if not info_only:
-                download_urls(urls, title, ext, size, output_dir, merge=merge)
+                download_urls(urls, title, ext, size, output_dir, merge=merge, 
headers=headers)
 
     # TODO: should we deal with quoted tweets?
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/ucas.py 
new/you-get-0.4.1743/src/you_get/extractors/ucas.py
--- old/you-get-0.4.1730/src/you_get/extractors/ucas.py 2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/ucas.py 2025-01-04 
02:50:35.000000000 +0100
@@ -3,7 +3,6 @@
 __all__ = ['ucas_download', 'ucas_download_single', 'ucas_download_playlist']
 
 from ..common import *
-import urllib.error
 import http.client
 from time import time
 from random import random
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/veoh.py 
new/you-get-0.4.1743/src/you_get/extractors/veoh.py
--- old/you-get-0.4.1730/src/you_get/extractors/veoh.py 2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/veoh.py 2025-01-04 
02:50:35.000000000 +0100
@@ -3,7 +3,6 @@
 __all__ = ['veoh_download']
 
 from ..common import *
-import urllib.error
 
 def veoh_download(url, output_dir = '.', merge = False, info_only = False, 
**kwargs):
     '''Get item_id'''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/yizhibo.py 
new/you-get-0.4.1743/src/you_get/extractors/yizhibo.py
--- old/you-get-0.4.1730/src/you_get/extractors/yizhibo.py      2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/yizhibo.py      2025-01-04 
02:50:35.000000000 +0100
@@ -4,7 +4,6 @@
 
 from ..common import *
 import json
-import time
 
 def yizhibo_download(url, output_dir = '.', merge = True, info_only = False, 
**kwargs):
     video_id = url[url.rfind('/')+1:].split(".")[0]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/youku.py 
new/you-get-0.4.1743/src/you_get/extractors/youku.py
--- old/you-get-0.4.1730/src/you_get/extractors/youku.py        2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/youku.py        2025-01-04 
02:50:35.000000000 +0100
@@ -5,7 +5,6 @@
 from ..extractor import VideoExtractor
 
 import time
-import traceback
 import json
 import urllib.request
 import urllib.parse
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/extractors/youtube.py 
new/you-get-0.4.1743/src/you_get/extractors/youtube.py
--- old/you-get-0.4.1730/src/you_get/extractors/youtube.py      2024-08-19 
21:53:12.000000000 +0200
+++ new/you-get-0.4.1743/src/you_get/extractors/youtube.py      2025-01-04 
02:50:35.000000000 +0100
@@ -82,8 +82,21 @@
             #   Xka - 
https://www.youtube.com/s/player/dc0c6770/player_ias.vflset/sv_SE/base.js
             #   jma - 
https://www.youtube.com/s/player/8d9f6215/player_ias.vflset/sv_SE/base.js
             f1 = match1(js, r',[$\w]+\.length\|\|([$\w]+)\(""\)\)}};')
+
+            # Examples:
+            #   Yla, ida - 
https://www.youtube.com/s/player/fb725ac8/player-plasma-ias-phone-sv_SE.vflset/base.js
+            #   Hla, eda - 
https://www.youtube.com/s/player/2f238d39/player-plasma-ias-phone-en_US.vflset/base.js
+            #   WyE, bE7, Gsn - 
https://www.youtube.com/s/player/3bb1f723/player-plasma-ias-phone-sv_SE.vflset/base.js
+            if not f1:
+                f0 = match1(js, r'\w=([$\w]+)\[0\]\(\w\),\w\.set\(\w,\w\)')
+                f1 = match1(js, r'%s=\[([$\w]+)\]' % f0)
+
             f1def = match1(js, r'\W%s=(function\(\w+\).+?\)});' % 
re.escape(f1))
-            n = dukpy.evaljs('(%s)("%s")' % (f1def, n))
+            v1 = match1(f1def, r'if\(typeof ([$\w]+)==="undefined"\)')
+            v1def = match1(js, r'(var %s=[^;]+;)' % v1)
+            if not v1def:
+                v1def = ''
+            n = dukpy.evaljs('%s(%s)("%s")' % (v1def, f1def, n))
             return n
 
         u = urlparse(url)
@@ -180,13 +193,20 @@
 
         playerResponseStatus = 
ytInitialPlayerResponse["playabilityStatus"]["status"]
         if playerResponseStatus != STATUS_OK:
-            reason = 
ytInitialPlayerResponse["playabilityStatus"].get("reason", "")
-            raise AssertionError(
-                f"Server refused to provide video details. Returned status: 
{playerResponseStatus}, reason: {reason}."
-            )
+            try:
+                reason = 
ytInitialPlayerResponse["playabilityStatus"]['errorScreen']\
+                    ['playerErrorMessageRenderer']['reason']['runs'][0]['text']
+                reason += ' ' + 
ytInitialPlayerResponse["playabilityStatus"]['errorScreen']\
+                    
['playerErrorMessageRenderer']['subreason']['runs'][0]['text']
+            except:
+                reason = 
ytInitialPlayerResponse["playabilityStatus"].get("reason", "")
+            if reason:
+                log.wtf(f'Server refused to provide video details. Returned 
status: {playerResponseStatus}. Reason: {reason}')
+            else:
+                log.wtf(f'Server refused to provide video details. Returned 
status: {playerResponseStatus}.')
 
     def prepare(self, **kwargs):
-        self.ua = 'Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 (KHTML, 
like Gecko) Chrome/127.0.6533.103 Mobile Safari/537.36'
+        self.ua = 'Mozilla/5.0 (iPad; CPU OS 16_7_10 like Mac OS X) 
AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 
Safari/604.1,gzip(gfe)'
 
         assert self.url or self.vid
 
@@ -266,6 +286,8 @@
             for ct in caption_tracks:
                 ttsurl, lang = ct['baseUrl'], ct['languageCode']
 
+                if ttsurl.startswith('/'):
+                    ttsurl = 'https://www.youtube.com' + ttsurl
                 tts_xml = parseString(get_content(ttsurl))
                 transcript = tts_xml.getElementsByTagName('transcript')[0]
                 texts = transcript.getElementsByTagName('text')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/you-get-0.4.1730/src/you_get/version.py 
new/you-get-0.4.1743/src/you_get/version.py
--- old/you-get-0.4.1730/src/you_get/version.py 2024-08-19 21:53:12.000000000 
+0200
+++ new/you-get-0.4.1743/src/you_get/version.py 2025-01-04 02:50:35.000000000 
+0100
@@ -1,4 +1,4 @@
 #!/usr/bin/env python
 
 script_name = 'you-get'
-__version__ = '0.4.1730'
+__version__ = '0.4.1743'

Reply via email to