yt-dlp: [PornHub] Unable to extract encoded url
Checklist
- I’m reporting a broken site
- I’ve verified that I’m running yt-dlp version 2022.06.29 (update instructions) or later (specify commit)
- I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
No response
Provide a description that is worded well enough to be understood
[PornHub] Unable to download JSON metadata: HTTP Error 403: Forbidden How to fix it?
Provide verbose output that clearly demonstrates the problem
- Run your yt-dlp command with -vU flag added (
yt-dlp -vU <your command line>
) - Copy the WHOLE output (starting with
[debug] Command-line config
) and insert it below
Complete Verbose Output
F:\downloader\pornhub>ytdl-patched https://www.pornhub.com/model/katekuray -F --verbose
[debug] Command-line config: ['https://www.pornhub.com/model/katekuray', '-F', '--verbose']
[debug] User config "D:\OS Files\Users\X\AppData\Roaming\yt-dlp\config": ['--continue', '--http-chunk-size', '1M', '--buffer-size', '16K', '--sub-lang', 'english', '--embed-metadata', '--abort-on-unavailable-fragment', '-o', '%(uploader)s\\%(title)s [%(id)s].%(ext)s', '-f', 'bestvideo[ext=mp4]+bestaudio[ext=m4a]', '--ffmpeg-location', 'D:\\OS Files\\Program Files\\ffmpeg\\bin', '--no-lock']
[debug] Encodings: locale cp65001, fs utf-8, pref cp65001, out utf-8, error utf-8, screen utf-8
[debug] ytdl-patched version 2022.06.29
[debug] ** The command you are running is not yt-dlp.
[debug] ** Please make bug reports at https://github.com/ytdl-patched/ytdl-patched/issues/new/choose instead.
[debug] Lazy loading extractors is disabled
[debug] Python 3.10.4 (CPython 64bit) - Windows-10-10.0.19043-SP0
[debug] Checking exe version: "D:\OS Files\Program Files\ffmpeg\bin\ffmpeg" -bsfs
[debug] Checking exe version: "D:\OS Files\Program Files\ffmpeg\bin\ffprobe" -bsfs
[debug] exe versions: ffmpeg 5.0.1-essentials_build-www.gyan.dev (setts), ffprobe 5.0.1-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.14.1, WebSocketsWrapper-None, brotli-1.0.9, certifi-2021.10.08, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.2
[debug] Proxy map: {}
[debug] [PornHubUser] Extracting URL: https://www.pornhub.com/model/katekuray
[debug] [PornHubPagedVideoList] Extracting URL: https://www.pornhub.com/model/katekuray/videos
[download] Downloading playlist: model/katekuray/videos
[PornHubPagedVideoList] model/katekuray/videos: Downloading page 1
[PornHubPagedVideoList] [debug] Fetching webpage from https://www.pornhub.com/model/katekuray/videos
[PornHubPagedVideoList] model/katekuray/videos: Downloading page 2
[PornHubPagedVideoList] [debug] Fetching webpage from https://www.pornhub.com/model/katekuray/videos
[PornHubPagedVideoList] Playlist model/katekuray/videos: Downloading 107 videos of 107
[download] Downloading video 11 of 107
[PornHub] ph5f71889303342: Downloading pc webpage
[PornHub] ph5f71889303342: Downloading m3u8 information
[PornHub] ph5f71889303342: Downloading m3u8 information
[PornHub] ph5f71889303342: Downloading m3u8 information
[PornHub] ph5f71889303342: Downloading m3u8 information
[PornHub] ph5f71889303342: Downloading JSON metadata
WARNING: [PornHub] Unable to download JSON metadata: HTTP Error 403: Forbidden
[info] Available formats for ph5f71889303342:
ID EXT RESOLUTION FPS │ FILESIZE TBR PROTO │ VCODEC VBR ACODEC ABR
───────────────────────────────────────────────────────────────────────────────────────
hls-509-0 mp4 426x240 59 │ ~ 4.48MiB 509k m3u8 │ avc1.64001e 509k mp4a.40.2 0k
hls-509-1 mp4 426x240 59 │ ~ 4.48MiB 509k m3u8 │ avc1.64001e 509k mp4a.40.2 0k
hls-902-0 mp4 854x480 59 │ ~ 7.93MiB 902k m3u8 │ avc1.64001f 902k mp4a.40.2 0k
hls-902-1 mp4 854x480 59 │ ~ 7.93MiB 902k m3u8 │ avc1.64001f 902k mp4a.40.2 0k
hls-1614-0 mp4 1280x720 59 │ ~14.19MiB 1614k m3u8 │ avc1.640020 1614k mp4a.40.2 0k
hls-1614-1 mp4 1280x720 59 │ ~14.19MiB 1614k m3u8 │ avc1.640020 1614k mp4a.40.2 0k
hls-2769 mp4 1920x1080 59 │ ~24.34MiB 2769k m3u8 │ avc1.64002a 2769k mp4a.40.2 0k
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 28 (10 by maintainers)
Per https://github.com/ytdl-org/youtube-dl/pull/31916 it looks like this could be a cookie problem
Does anyone who is affected by this issue (I’m not) want to test this patch? Feel free to PR it if it works
Any news when this will be merged into master?
@hauke96 @Maxwell12347842
That may be the issue, was using the unchanged checkout of the main branch. Will add the changes from PR #6685 and try again.
Edit: Applying the patch works like a charm. Hope this gets merged into master soon.
@Lumpi33 German IP here, too. Have you really added the changes from PR #6685 ? They have not been merged into the main code base yet.
Just tested from germany and can confirm the fix works.