question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[YouPorn] Unable to download JSON metadata: HTTP Error 403: Forbidden

See original GitHub issue

Checklist

Region

No response

Description

Error happens using whatever YP link and download stops. With Youtube-dl a different error is reported: WARNING: unable to extract upload date; please report this issue... but the download starts successfully.

Verbose log

C:\temp\YT-DLP>yt-dlp -vU "https://www.youporn.com/watch/16516654/sego-lamico-di-mio-marito-al-ristorante-e-non-si-accorge-di-niente/"
[debug] Command-line config: ['-vU', 'https://www.youporn.com/watch/16516654/sego-lamico-di-mio-marito-al-ristorante-e-non-si-accorge-di-niente/']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2022.02.04 [c1653e9] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] exe versions: ffmpeg 4.2.3, ffprobe 4.2.3
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.02.04, Current version: 2022.02.04
yt-dlp is up to date (2022.02.04)
[debug] [YouPorn] Extracting URL: https://www.youporn.com/watch/16516654/sego-lamico-di-mio-marito-al-ristorante-e-non-si-accorge-di-niente/
[YouPorn] sego-lamico-di-mio-marito-al-ristorante-e-non-si-accorge-di-niente: Downloading JSON metadata
ERROR: [YouPorn] 16516654: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U (caused by <HTTPError 403: 'Forbidden'>); please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U
  File "yt_dlp\extractor\common.py", line 730, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3558, in urlopen
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 640, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 649, in http_error_default


C:\temp\YT-DLP>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
marieellcommented, Feb 14, 2022

Downgrading to ssl.PROTOCOL_TLSv1_2 works for me.

1reaction
dirkfcommented, Feb 10, 2022

This patch deals with the warning:

--- old/youtube-dl/youtube_dl/extractor/youporn.py
+++ new/youtube-dl/youtube_dl/extractor/youporn.py
@@ -137,9 +137,10 @@
             r'(?s)<div[^>]+class=["\']submitByLink["\'][^>]*>(.+?)</div>',
             webpage, 'uploader', fatal=False)
         upload_date = unified_strdate(self._html_search_regex(
-            [r'UPLOADED:\s*<span>([^<]+)',
+            (r'UPLOADED:\s*<span>([^<]+)',
              r'Date\s+[Aa]dded:\s*<span>([^<]+)',
-             r'(?s)<div[^>]+class=["\']videoInfo(?:Date|Time)["\'][^>]*>(.+?)</div>'],
+             r'(?s)<div[^>]+class=["\']videoInfo(?:Date|Time)["\'][^>]*>(.+?)</div>',
+             r'(?s)<label\b[^>]*>Uploaded[^<]*</label>\s*<span\b[^>]*>(.+?)</span>'),
             webpage, 'upload date', fatal=False))
 
         age_limit = self._rta_search(webpage)
Read more comments on GitHub >

github_iconTop Results From Across the Web

youtube-dl Unable to download JSON metadata: HTTP Error ...
Unable to download JSON metadata : HTTP Error 403: Forbidden. What is the problem ? I Used last version of Youtube-dl
Read more >
Unable to download JSON metadata: HTTP Error 404: Not ...
Can't download some playlists "ERROR: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by HTTPError())" : r/youtubedl.
Read more >
Fix "Unable to download video data: HTTP Error 403
This guide explains how to fix "Unable to download video data: HTTP Error 403: Forbidden" Error When Downloading Media Files With Youtube-dl ...
Read more >
Issues #15001 - 20000
#15419, issue, 2018-01, Error: stdout maxBuffer exceeded, 1. #15420, issue, 2018-01, Unable to download JSON metadata: HTTP Error 403: FORBIDDEN [Udemy], 1.
Read more >
youtube-dl 2021.06.06 - freshcode.club
youtube-dl is a small command-line tool to download videos. ... YoutubeDL Properly process unable-to-download-error on python2. vevo Remove superfluous code ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found