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

Youtube URLs -J return 403 sometimes #18987

Closed
nadermx opened this issue Jan 24, 2019 · 3 comments
Closed

Youtube URLs -J return 403 sometimes #18987

nadermx opened this issue Jan 24, 2019 · 3 comments

Comments

@nadermx
Copy link

@nadermx nadermx commented Jan 24, 2019

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.01.24. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2019.01.24

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

I'm currently using youtube-dl to get the URL of the video, via this command.

youtube-dl -f bestaudio --no-cache-dir --geo-bypass --restrict-filenames -J --cookies cookies.txt youtubeURL

From there I am taking that URL, on the same server, and using ffmpeg's -i, with the -headers by sending the cookie and the headers, but I still get a decent amount of 403 errores.

Is there a reason this would happen? Given that it is on the same IP as the initial scrape? Should I use -g instead?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 24, 2019

If downloading via youtube-dl itself does not result in 403 then you are most likely not passing headers/cookies correctly.

@dstftw dstftw closed this Jan 24, 2019
@nadermx
Copy link
Author

@nadermx nadermx commented Jan 25, 2019

@dstftw by chance do you have a example of a get request sent with headers? My current request header sends the cookie and headers like so


 "GET / HTTP/1.1" 200 -
Range: bytes=0-
Connection: close
Host: localhost:8000
Icy-MetaData: 1
Cookie: GPS=1; PREF=f1=50000000&hl=en; VISITOR_INFO1_LIVE=YYVg5wZlZM4; YSC=nqFTzbjynHk; s_gl=1d69aac621b2f9c0a25dade722d6e24bcwIAAABVUw==
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language: en-us,en;q=0.5
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 25, 2019

See --print-traffic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.