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

Fix PBS SoCal Extractor #8703

Open
11 tasks done
hitomi-nakayama opened this issue Dec 3, 2023 · 2 comments · May be fixed by #9740
Open
11 tasks done

Fix PBS SoCal Extractor #8703

hitomi-nakayama opened this issue Dec 3, 2023 · 2 comments · May be fixed by #9740
Labels
good first issue Good for new devs patch-available There is patch available that should fix this issue. Someone needs to make a PR with it site-enhancement Feature request for some website

Comments

@hitomi-nakayama
Copy link

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

US

Provide a description that is worded well enough to be understood

I am trying to download videos from PBS SoCal, but the PBS extractor doesn't recognize the URL.

For the individual video links, it appears that the PBS extractor's URL parser only needs to be adjusted.

I'm not sure how to fix the playlist issues, however.

Example URLs:

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-vU', '--write-subs', '--sub-format', 'best', '--skip-download', 'https://www.pbssocal.org/shows/visiting-huell-howser/episodes/glass-museum']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version [email protected] from yt-dlp/yt-dlp [24f827875] (source)
[debug] Lazy loading extractors is disabled
[debug] Git HEAD: 6a9c7a2b5
[debug] Python 3.11.5 (CPython x86_64 64bit) - Linux-6.1.57-gentoo-x86_64-AMD_Ryzen_5_2500U_with_Radeon_Vega_Mobile_Gfx-with-glibc2.37 (OpenSSL 3.0.11 19 Sep 2023, glibc 2.37)
[debug] exe versions: ffmpeg 6.0 (setts), ffprobe 6.0
[debug] Optional libraries: certifi-3021.03.16, pycrypto-3.18.0, requests-2.31.0, sqlite3-3.43.2, urllib3-2.0.6
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests
[debug] Loaded 1792 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: [email protected] from yt-dlp/yt-dlp
yt-dlp is up to date ([email protected] from yt-dlp/yt-dlp)
[generic] Extracting URL: https://www.pbssocal.org/shows/visiting-huell-howser/episodes/glass-museum
[generic] glass-museum: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] glass-museum: Extracting information
[debug] Looking for embeds
ERROR: Unsupported URL: https://www.pbssocal.org/shows/visiting-huell-howser/episodes/glass-museum
Traceback (most recent call last):
  File "/home/hitomi/code/yt-dlp/yt_dlp/YoutubeDL.py", line 1570, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hitomi/code/yt-dlp/yt_dlp/YoutubeDL.py", line 1705, in __extract_info
    ie_result = ie.extract(url)
                ^^^^^^^^^^^^^^^
  File "/home/hitomi/code/yt-dlp/yt_dlp/extractor/common.py", line 717, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hitomi/code/yt-dlp/yt_dlp/extractor/generic.py", line 2531, in _real_extract
    raise UnsupportedError(url)
yt_dlp.utils.UnsupportedError: Unsupported URL: https://www.pbssocal.org/shows/visiting-huell-howser/episodes/glass-museum
@hitomi-nakayama hitomi-nakayama added site-bug Issue with a specific website triage Untriaged issue labels Dec 3, 2023
@hitomi-nakayama
Copy link
Author

I was able to hack the single-video downloading by adding pbssocal to this line:
https://github.com/hitomi-Nakayama/yt-dlp/blob/pbs-socal/yt_dlp/extractor/pbs.py#L192

Adding it to _STATIONS doesn't work because the URL is formatted differently.
I'm not sure how I'm supposed to modify this in a non-hacky way.

Additionally, my hack does not fix the issues with downloading full seasons.

@pukkandan
Copy link
Member

I was able to hack the single-video downloading by adding pbssocal to this line: hitomi-Nakayama/yt-dlp@pbs-socal/yt_dlp/extractor/pbs.py#L192

Adding it to _STATIONS doesn't work because the URL is formatted differently. I'm not sure how I'm supposed to modify this in a non-hacky way.

Your patch looks fine to merge. Please make a PR

@pukkandan pukkandan added good first issue Good for new devs site-enhancement Feature request for some website patch-available There is patch available that should fix this issue. Someone needs to make a PR with it and removed site-bug Issue with a specific website triage Untriaged issue labels Dec 3, 2023
n10dollar added a commit to n10dollar/yt-dlp that referenced this issue Apr 20, 2024
@n10dollar n10dollar linked a pull request Apr 20, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for new devs patch-available There is patch available that should fix this issue. Someone needs to make a PR with it site-enhancement Feature request for some website
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants