Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Periscope // Unable to download JSON metadata: HTTP Error 400: Bad Request #24952
Comments
|
You must provide complete reproducible environment. |
Hi, I've searched through every response I could find regarding this issue but couldn't seem to find anything concrete. For clarity, the issue is NOT that this happens every single time, but that it seems to only be happening on one account and only via packaged python?
URL in question: https://www.pscp.tv/10DowningStreet/1BRJjQvAPpgGw
I am trying to grab the .m3u8 stream urls from this account everyday. In command-line this is simple as I'm just running with the -g command. This works fine. When I run this URL through the python code in below it also produces the URL just fine. However, when I run through once the code has been packaged with pyinstaller I am getting a 400 Error.
If this were happening with all periscope URLs it would be understandable, but it is just this account.
I've included the minimal STDOUT just as proof the code is recieving the right URL.
Version: 2020.3.24
STDOUT:
[periscope] 1BRJjQvAPpgGw : Downloading JSON metadata the finalurl recieved is: https://www.pscp.tv/10DowningStreet/1BRJjQvAPpgGwPython code:
ydl_opts = {
'cachedir': False,
'geo_bypass': True,
'forceurl': True,
}
ERROR:
ERROR: Unable to download JSON metadata: HTTP Error 400: Bad Request (caused by <HTTPError 400: 'Bad Request'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "site-packages\youtube_dl\extractor\common.py", line 627, in _request_webpage
File "site-packages\youtube_dl\YoutubeDL.py", line 2238, 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
urllib.error.HTTPError: HTTP Error 400: Bad Request
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "site-packages\youtube_dl\YoutubeDL.py", line 797, in extract_info
File "site-packages\youtube_dl\extractor\common.py", line 530, in extract
File "site-packages\youtube_dl\extractor\periscope.py", line 102, in _real_extract
File "site-packages\youtube_dl\extractor\periscope.py", line 16, in _call_api
File "site-packages\youtube_dl\extractor\common.py", line 888, in _download_json
File "site-packages\youtube_dl\extractor\common.py", line 867, in _download_json_handle
File "site-packages\youtube_dl\extractor\common.py", line 660, in _download_webpage_handle
File "site-packages\youtube_dl\extractor\common.py", line 645, in _request_webpage
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 400: Bad Request (caused by <HTTPError 400: 'Bad Request'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Extractor.py", line 506, in
File "dllive.py", line 40, in download
File "site-packages\youtube_dl\YoutubeDL.py", line 820, in extract_info
File "site-packages\youtube_dl\YoutubeDL.py", line 625, in report_error
File "site-packages\youtube_dl\YoutubeDL.py", line 595, in trouble
youtube_dl.utils.DownloadError: ERROR: Unable to download JSON metadata: HTTP Error 400: Bad Request (caused by <HTTPError 400: 'Bad Request'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.