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.
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.