Giter VIP home page Giter VIP logo

Comments (23)

Tatsh avatar Tatsh commented on August 20, 2024

What is the output of youtube-clear-watch-later --cookies 1.txt --debug?

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

image
This is the ouput.
It seems to be a reminder that the file storing the cookies does not exist, but the file exists.

I would also like to ask, how do I use youtube-unofficial in other python files: X-YouTube-Client-Version, X-YouTube-Page-Label, X-YouTube-Page-CL, X-YouTube-Variants -Checksum, X-Youtube-Identity-Token.

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

I have a file that needs to use YouTube cookies, but I don't know how to log in to YouTube, youtube-unofficial can log in to YouTube, so I want to ask, what do I need to do to use the following parameters in other python files: cookies, X -YouTube-Client-Version, X-YouTube-Page-Label, X-YouTube-Page-CL, X-YouTube-Variants -Checksum, X-Youtube-Identity-Token.
Thank you very much!

from youtube-unofficial.

Tatsh avatar Tatsh commented on August 20, 2024

Those are found by regex'ing the JS. I use BeatifulSoup4 to get the <script> tag.

See https://github.com/Tatsh/youtube-unofficial/blob/master/youtube_unofficial/__init__.py#L308

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

Ok, these seem like I can do it, but how do I log in to YouTube and get a cookie? Because if you want to get this information in the script tag, you must log in or use the cookie to access the page.

from youtube-unofficial.

Tatsh avatar Tatsh commented on August 20, 2024

The #login() method. This is heavily based on youtube-dl's code.

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

I found a problem. When I ran youtube-clear-watch-later, my watch later: https://www.youtube.com/playlist?list=WL, there was still a video.

from youtube-unofficial.

Tatsh avatar Tatsh commented on August 20, 2024

That's a known bug. Only the first page of videos is handled.

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

My watch later has only one video, but I still can't successfully clean this video, and I looked at the cookies, it seems to be invalid cookies.
image

from youtube-unofficial.

Tatsh avatar Tatsh commented on August 20, 2024

Mine has these cookies. I do not know which ones are required.

ACCOUNT_CHOOSER
APISID
GAPS
HSID
LOGIN_INFO
LSID
NID
OSID
PREF
SAPISID
s_gl
SID
SIDCC
SSID
VISITOR_INFO1_LIVE
YSC

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

I mean youtube-unofficial can't log in normally. Can you check it out? I used -u -p and netrc files but they don't work. All kinds of signs indicate that I should not be logged into YouTube, so executing the command has no effect.

from youtube-unofficial.

Tatsh avatar Tatsh commented on August 20, 2024

I just pushed some changes that should fix this as long as you are not using two-factor authentication. Please try that out.

from youtube-unofficial.

Tatsh avatar Tatsh commented on August 20, 2024

And with the last commit just pushed 2FA should be working. SMS only.

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

76EBE833-56F2-44B4-97ED-A7D3AC74EC7C
528CB614-3A78-4ED6-96C2-2DC9A4E4D99B
This is the result of running after I run git pull on two servers.

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

I am sure the password is correct.

from youtube-unofficial.

Tatsh avatar Tatsh commented on August 20, 2024

Are you sure you have netrc formatted correctly?

machine youtube login [email protected] password thePasswordGoesHere

Your email might have a different domain and thats's okay.

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

I am very sure that my account password is ok.

from youtube-unofficial.

Tatsh avatar Tatsh commented on August 20, 2024

Can you try passing arguments instead of netrc? I am not having any issues here with my file.

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

I just tried passing the parameters and I still prompted this. I can log in to Google on Chrome with my account password.

from youtube-unofficial.

Tatsh avatar Tatsh commented on August 20, 2024

Do you have a regular Google account or an organisation account? Does your Google account use @gmail.com for email?

If you are on an organisation account, does that use a proxy to login?

I've had someone else verify this latest code with their non-2FA account and it worked for them.

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

I used three Google accounts and three servers, all of which prompted a password error.
My Google account use @gmail.com for email.
Are my personal accounts.
And I turned off phone verification and 2FA.

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

Just now, I changed a server again, this time it was successful!

from youtube-unofficial.

Aruelius avatar Aruelius commented on August 20, 2024

Finally, thank you for helping me, thank you very much.

from youtube-unofficial.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.