youtube_extract icon indicating copy to clipboard operation
youtube_extract copied to clipboard

Is it possible to have the Channel URL inside the main python file?

Open bt400 opened this issue 3 years ago • 0 comments

Hello, thank you for the code, I run this code on my computer (windows 7 and python 3.8) and it works just fine as long as there are not many videos on the channel.

I get this error when tried a channel with 893 videos on it.

Traceback (most recent call last):
  File "C:\Program Files\Python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\__Python-Scripts\2-YT_extract-1.3.8\youtube_extract\__main__.py", line 136, in <module>
    main()
  File "C:\__Python-Scripts\2-YT_extract-1.3.8\youtube_extract\__main__.py", line 93, in main
    entries = extract_entries_for_url(args.channel_url)
  File "C:\__Python-Scripts\2-YT_extract-1.3.8\youtube_extract\__main__.py", line 58, in extract_entries_for_url
    best_format = entry["formats"][-2]["format"]
IndexError: list index out of range
PS C:\__Python-Scripts\2-YT_extract-1.3.8>

Another problem is when there is a live stream video in the channel, it throws errors, and does not extract anything.

1- Is it possible to have the URL of the channel somewhere in a python file, or even in a text file or CSV file, instead of typing in it in the command prompt?

2- For the channels with lots of videos, is it possible to let it extract in small batches instead of extracting all of the videos info at once, maybe 20 or 30 video info at the time, then a delay and continue.

3- is it possible to bypass the live stream video in the channel if there is any, and continue with extracting?

thanks

bt400 avatar Nov 06 '21 23:11 bt400