Closed SmartestDolphin closed 4 weeks ago
I ran your code and it worked for me. I'm assuming you're running ver 0.0.26. If so, please provide the output of the following two statements:
pyk.get_tiktok_json('https://www.tiktok.com/@tiktok/video/7106594312292453675?is_copy_url=1&is_from_webapp=v1')
pyk.alt_get_tiktok_json('https://www.tiktok.com/@tiktok/video/7106594312292453675?is_copy_url=1&is_from_webapp=v1')
I am running version 0.0.26 installed via pip. The output of pyk.get_tiktok_json('https://www.tiktok.com/@tiktok/video/7106594312292453675?is_copy_url=1&is_from_webapp=v1', browser_name='firefox')
is a dictionary with this structure (if you need values nested more deeply let me know)
{
"AppContext": {
"appContext": "...",
"initialized": "...",
"lang": "...",
"sideNavActive": "..."
},
"BizContext": {
"bizContext": "...",
"initialized": "..."
},
"LoginContextModule": {
"initialized": "...",
"phoenix": "...",
"platformConfig": "...",
"emailSuffixConfig": "...",
"previousModalType": "...",
"loginTitle": "...",
"loginSlogan": "...",
"signUpTitle": "...",
"signUpSlogan": "...",
"aid": "...",
"disableSignup": "...",
"isSecurityVerification": "...",
"hideHomePage": "...",
"loginType": "...",
"redirectUrl": "...",
"isModal": "...",
"hideCloseButton": "...",
"hideToggleLoginSign": "...",
"targetAid": "...",
"noCtaPopup": "...",
"standaloneAid": "...",
"signupConfig": "...",
"forceLogin": "...",
"emailConsent": "...",
"ttpConfig": "...",
"preventSignupText": "...",
"lastLoginMethod": "..."
}
}
The ouput of pyk.alt_get_tiktok_json('https://www.tiktok.com/@tiktok/video/7106594312292453675?is_copy_url=1&is_from_webapp=v1', browser_name='firefox')
is:
{
"__DEFAULT_SCOPE__": {
"webapp.app-context": "...",
"webapp.i18n-translation": "..."
}
}
I should mention that I'm running on Windows 11, Python 3.11
Yeah, I'm gonna need the complete unabridged output if you want help. Also, please go into your local version of the package and reproduce line 237 of pyktok.py
for me, as what you posted in the error does not match line 237 in the current version.
Hi, to be sure I just did pip uninstall pyktok
followed by pip install pyktok
(version 0.0.26)
The code that I get from pypy still gives me the same error
here is a screenshot of the portion you asked for:
I see that in the repository source code on line 237 there is no code at all so maybe the version on pypy is not up to date?
Yes, I recently merged an external PR but didn't update the PyPI version to match, so am doing that now. Thanks for pointing that out, but it won't fix your problem. Based on the output you provided, it looks like TikTok is giving you something different than it's giving me. The next step is to browse to a TikTok video page, "View Source," and send me the entire source HTML document. I suggest posting a cloud link here, or looking up my email and sending it to me that way.
Closed due to lack of activity.
Hello, I'm have issues trying to use this package. After a fresh install with the pip command and after installing each package separately, I'm trying to run one of the examples. I tried to run both with the app.py and from a python script. If I try to run this code
I get this error:
If I open firefox on my machine and go to tiktok.com I am already logged in.
Any help would be appreciated, thanks!