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

'ytcfg is not defined' error occured since a weeks ago #13

Open
utylee opened this issue Aug 19, 2023 · 2 comments
Open

'ytcfg is not defined' error occured since a weeks ago #13

utylee opened this issue Aug 19, 2023 · 2 comments

Comments

@utylee
Copy link

utylee commented Aug 19, 2023

First, thank you for your great work.
I have used ytstudio module about a month and it operates very well until a week ago. But since a week ago 'ytcfg is not defined' error is occurring whenever 'await yt.login()' calls.

To solve the problem, I erased all the cookies and re-login in studio.youtube.com on browser several times, and correct the
new cookies data and printed all cookies data in ytstudio's Studio class to confirm if cookies is correct or not

Cookie datas in login.json was correct (include SESSION_TOKEN too (from developer mode /grst ) but looks like it can't read the site's script and 'ytcfg' object.
Is studio.youtube.com changed recently , or Am I missing something?

[ in my_program.py ]

...
await yt.login()
...

[ in module ytstudio/init.py ]
...
async def login(self) -> bool:
....
self.js.execute(f"{script} window.ytcfg = ytcfg;")

==>

File "/home/utylee/.virtualenvs/misc/lib/python3.8/site-packages/ytstudio/init.py", line 68, in login
self.js.execute(
js2py.internals.simplex.JsException: ReferenceError: ytcfg is not defined

@infopcgood
Copy link

Same problem here.

@Anyquach90
Copy link

@utylee Have you fixed this error yet? Can you share it with me?

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

No branches or pull requests

3 participants