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

Issue with running fetchVideo(url) #24

Open
khatiwadaaj opened this issue Sep 23, 2023 · 5 comments
Open

Issue with running fetchVideo(url) #24

khatiwadaaj opened this issue Sep 23, 2023 · 5 comments

Comments

@khatiwadaaj
Copy link

TypeError: Cannot read properties of undefined (reading 'indexOf')
at l.extractJSONObject (C:\My Files\mynodeserver\node_modules\tiktok-scraper-ts\dist\main.js:1:4

Doesn't even run the first time, anyone able to run this package?

@lavanphat
Copy link

Today, I got the same error as you. Did you fix this error ? @khatiwadaaj

@khatiwadaaj
Copy link
Author

I gave up on this package and created my own custom solution.

@lavanphat
Copy link

I gave up on this package and created my own custom solution.

Can you send me your custom solution?

@mayaYun0921
Copy link

@khatiwadaaj

Hello, I am a developer who needs a TikTok scraper.
I also encountered the same error as this issue. Can you share how you solved it?

TypeError: Cannot read properties of undefined (reading 'indexOf')
at l.extractJSONObject 

I looked for it in your repository, but I couldn't find it.
I would really appreciate your help.

@sliptype
Copy link

sliptype commented Feb 7, 2024

I'm also getting this on fetchUser

TypeError: Cannot read properties of undefined (reading 'indexOf')
    at m.extractJSONObject (/home/node/app/node_modules/tiktok-scraper-ts/dist/main.js:1:2914)
    at m.requestWithPuppeteer (/home/node/app/node_modules/tiktok-scraper-ts/dist/main.js:1:3335)
    at async m.TryFetch (/home/node/app/node_modules/tiktok-scraper-ts/dist/main.js:1:3677)
    at async m.user (/home/node/app/node_modules/tiktok-scraper-ts/dist/main.js:1:4623)

It seems that <script id="SIGI_STATE" type="application/json"> no longer exists in the response from tiktok. Perhaps tiktok-scraper-ts needs to be updated to use <script id="__UNIVERSAL_DATA_FOR_REHYDRATION__" type="application/json"> instead? cc @naseif

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

4 participants