Closed Muh9049 closed 2 years ago
I think this is already addressed in https://github.com/drawrowfly/tiktok-scraper/issues/681
And @drawrowfly said he is preparing a fix
Is your feature request related to a problem? Please describe. The .getVideoMeta functions seems to only work with desktop tiktok links only but errors with mobile links. (vm.tiktok.com)
Describe the solution you'd like Would it be possible to make it support mobile links too? Or is there any function that can convert the mobile link to the desktop links?
Error it returns if you try putting in a mobile link:
triggerUncaughtException(err, true /* fromPromise */); ^ [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Can't extract video metadata: [link here]".] { code: 'ERR_UNHANDLED_REJECTION' }
I have the solution, vm.tiktok.com/
sorry my english is bad hope you can understand it
@aliazhar-id Can you give an example of an expanded link? The mobile vm.tiktok.com links don’t have a username and have a different video id than the desktop tiktok.com links so I’m not sure how that’ll exactly work.
@Muh9049
you can use one of these modules:
I have an example of its use in my repository https://github.com/aliazhar-id/SaveThis/blob/6387d7298f95f529baa9f34052d5d5d72601704f/src/events/download.js#L16
@Muh9049
you can use one of these modules:
- https://www.npmjs.com/package/unshorten.it (I'm currently using this, but have plans to use the second one)
- https://www.npmjs.com/package/tall
I have an example of its use in my repository https://github.com/aliazhar-id/SaveThis/blob/6387d7298f95f529baa9f34052d5d5d72601704f/src/events/download.js#L16
Thanks! I’ll try this out later.
No Problem 👍
@aliazhar-id What are the ratelimits for those packages? My bot does get high traffic in terms of command usage so that’s my only concern if those packages/APIs enforce a strict ratelimit
@aliazhar-id What are the ratelimits for those packages? My bot does get high traffic in terms of command usage so that’s my only concern if those packages/APIs enforce a strict ratelimit
not mentioned by the owner API, but you can read the TOS https://unshorten.it/terms-of-service, if you are worried you can use the tall module. I've tried but failed, I don't know if you try.
Is your feature request related to a problem? Please describe. The .getVideoMeta functions seems to only work with desktop tiktok links only but errors with mobile links. (vm.tiktok.com)
Describe the solution you'd like Would it be possible to make it support mobile links too? Or is there any function that can convert the mobile link to the desktop links?
Error it returns if you try putting in a mobile link: