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

Python's method of carrying cookies #25872

Closed
lzkgbld opened this issue Jul 2, 2020 · 0 comments
Closed

Python's method of carrying cookies #25872

lzkgbld opened this issue Jul 2, 2020 · 0 comments

Comments

@lzkgbld
Copy link

@lzkgbld lzkgbld commented Jul 2, 2020

Hello, may I ask who knows how to carry the cookie login status in Python code to download the video in the website?

I already know how to carry the command line, but in Python code, I tried to carry the file address of the cookie, but it didn't work. Who knows how to carry the cookie in Python? Here is my code:

Def the download (youtube_url) :

Ydl_opts = {

"Cookies" : "F: / project/python/UploadFile/Include/cookies, TXT",

'outtmpl' : '% (title) s (ext) % s',

'proxy' : '127.0.0.1:10809',

}

With youtube_dl. YoutubeDL (ydl_opts) as ydl:

Result = ydl. Download ([youtube_url])

If you don't understand the above code, please show me the code you downloaded with cookies in Python. Thank you.

@lzkgbld lzkgbld added the question label Jul 2, 2020
@dstftw dstftw closed this Jul 2, 2020
@dstftw dstftw added the duplicate label Jul 2, 2020
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.