Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] TypeError: expected string or bytes-like object when scraping VODs from channel beyondthesummit #199

Open
TheTechRobo opened this issue Feb 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@TheTechRobo
Copy link

TheTechRobo commented Feb 28, 2023

Basic information

  • Program version: 0.2.4
  • Python version: 3.9.2
  • Operating system: Debian Bullseye

Describe the bug

When I run the get_user_videos method on channel beyondthesummit, after about a minute I get the aforementioned error.

Command/Code used

This code:

from chat_downloader.sites import TwitchChatDownloader

[vod['id'] for vod in (TwitchChatDownloader().get_user_videos("beyondthesummit"))]

Outputs:

Traceback (most recent call last):
  File "/home/thetechrobo/testvodget.py", line 3, in <module>
    [vod['id'] for vod in (TwitchChatDownloader().get_user_videos("beyondthesummit"))]
  File "/home/thetechrobo/testvodget.py", line 3, in <listcomp>
    [vod['id'] for vod in (TwitchChatDownloader().get_user_videos("beyondthesummit"))]
  File "/home/thetechrobo/.local/lib/python3.9/site-packages/chat_downloader/sites/twitch.py", line 1019, in get_user_videos
    yield r.remap_dict(node, TwitchChatDownloader._VIDEO_REMAPPING)
  File "/home/thetechrobo/.local/lib/python3.9/site-packages/chat_downloader/sites/common.py", line 174, in remap_dict
    Remapper.remap(
  File "/home/thetechrobo/.local/lib/python3.9/site-packages/chat_downloader/sites/common.py", line 129, in remap
    new_value = remap.remap_function(remap_input)
  File "/home/thetechrobo/.local/lib/python3.9/site-packages/chat_downloader/utils/core.py", line 26, in timestamp_to_microseconds
    info = list(filter(None, re.split(r'[\.|Z]{1}', timestamp))) + [0]
  File "/usr/lib/python3.9/re.py", line 231, in split
    return _compile(pattern, flags).split(string, maxsplit)
TypeError: expected string or bytes-like object

Expected behavior

I expected to get a list of vod IDs.

Additional context/information

I've never used the module before - only the CLI -, so I could be using it incorrectly; let me know if that's the case.

@TheTechRobo TheTechRobo added the bug Something isn't working label Feb 28, 2023
@TheTechRobo
Copy link
Author

Hate to bug you, but this still occurs for me on chat_downloader 0.2.5... any update?

I'd run this verbosely, but I'm not sure how to do this with the CLI and idk how to set it from the module (logging.debug level doesn't seem to do anything except do urllib messages).

@TheTechRobo TheTechRobo changed the title [BUG] TypeError: expected string or bytes-like object on channel beyondthesummit [BUG] TypeError: expected string or bytes-like object when scraping VODs from channel beyondthesummit May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant