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

"Unexpected end of JSON input" When trying to get all videos from a user ... #10

Open
palmthree-studio opened this issue Sep 18, 2022 · 8 comments

Comments

@palmthree-studio
Copy link

palmthree-studio commented Sep 18, 2022

Hello,

I've tried anything that I can, but I am never able to get all videos from a user ...

I always have this error : invalid json response body at https://api2.musical.ly/aweme/v1/aweme/detail/?aweme_id=7144372530571267333 reason: Unexpected end of JSON input. type: 'invalid-json';

This is my code :

app.get('/getAllVideos', async (req, res) => {
  var username = "exclutele";
  const videos = await tiktokscraper.getAllVideosFromUser(username,true);
  res.send(videos);
  console.log(videos);
});

Can you help me to figure it out ?

Thanks !

@weisensee
Copy link

@palmthree-studio for what it's worth, I'm getting the same thing getting video info...

@naseif
Copy link
Owner

naseif commented Oct 22, 2022

Hey @palmthree-studio and @weisensee, You are getting this error because the api which is used by the library to fetch the videos without watermark is down. I have been looking for alternatives for some time now. Will be fixed soon 🤘🏼

@simmison
Copy link

If the api is only down to download the videos without watermark, is there maybe a way to get the videos with watermark? I am only interested in the data from the videos of a user. I don't need the videos themselves. Is there any way to customize the repository somewhere so you can use that for this?

@jpaladin
Copy link

@naseif I also get the invalid json response. The reason is your fetch for https://m.tiktok.com/api/post/item_list/... returns empty string which then cannot be deserialized into valid JSON. I don't know the reason is started returning empty string but is there an alternative?

@jpaladin
Copy link

Same error for python implementations
davidteather/TikTok-Api#974

@naseif
Copy link
Owner

naseif commented Jan 26, 2023

Fixed in 6a8bea4, Please update the library to the latest version

@horsaen
Copy link

horsaen commented Feb 12, 2023

Fixed in 6a8bea4, Please update the library to the latest version

looks like the issue's back, using 1.4.1

@mikebg95
Copy link

mikebg95 commented Sep 6, 2023

I'm still having the same issue, also using 1.4.1.

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

7 participants