Introduce primary_client, fallback_client, and last_resort_client variables for better configurability.
Replace hardcoded 'android_vr' with primary_client in fetch_player_response call.
Bug:
Traceback (most recent call last):
File "/home/rusian/yt-local/youtube/comments.py", line 180, in video_comments
post_process_comments_info(comments_info)
File "/home/rusian/yt-local/youtube/comments.py", line 81, in post_process_comments_info
comment['author'] = strip_non_ascii(comment['author'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rusian/yt-local/youtube/util.py", line 843, in strip_non_ascii
stripped = (c for c in string if 0 < ord(c) < 127)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 900, in gevent._gevent_cgreenlet.Greenlet.run
File "/home/rusian/yt-local/youtube/comments.py", line 195, in video_comments
comments_info['error'] = 'YouTube blocked the request. IP address: %s' % e.ip
^^^^
AttributeError: 'TypeError' object has no attribute 'ip'
2025-03-08T01:25:47Z <Greenlet at 0x7f251e5279c0: video_comments('hcm55lU9knw', 0, lc='')> failed with AttributeError
- Introduced `BUFFER_CONFIG` to define buffer sizes for various systems (webOS, Samsung Tizen, Android TV, desktop).
- Added `detectSystem()` function to determine the platform based on `navigator.userAgent`.
- Updated `Stream` constructor to use platform-specific buffer sizes dynamically.
- Added console log for debugging detected system and applied buffer size.
tests/test_util.py: 14 warnings
/home/runner/work/yt-local/youtube-local/youtube/util.py:321: DeprecationWarning: HTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default).
response.getheader('Content-Encoding', default='identity'))
This was an old experiment to collect googlevideo domains to see
if there was a pattern that could correlate to IP address to
look for workarounds for 403 errors
Can bug out if enabled and if failed to get any vidoe urls,
so remove since it is obsolete and some people are enabling it
See #218
This way, buttons will still appear even if there is a failure
to read playlist metadata
Fixes #220# Please enter the commit message for your changes. Lines starting
Specifically, set a maximum height and added vertical scrolling
to address an issue related to Plyr's menu height.
Improve the overall usability and visual appearance of the menu in video player.