carcabot / tiktok-signature Goto Github PK
View Code? Open in Web Editor NEWGenerate tiktok signature token using node
Generate tiktok signature token using node
i get signature and try to request comment api but signature not work. for the respone
{"statusCode":200,"contentType":"application/json","content":""},how to get a new tac?
Hello,
When i try to generate a signature, i have always the same key: "s0Ju9AAgEBDs0t-zd4dzFLNCb-AAO0V"
Do you have some information on how it works.
Thanks a lot.
Hey there, I'm having an issue using the signature in urls that follow the format below
https://m.tiktok.com/api/user/detail/?uniqueId=accountName&language=en&verifyFp=&_signature=generatedSignature
This is the right formatting for the URL as I just copy and pasted it from my chrome network tab and it correctly works if I run it with an account name and my signature generated on my chrome browser not puppeteer.
This should be the expected output for @worldeconomicforum
{"statusCode":0,"userInfo":{"user":{"id":"6618914290789908486","uniqueId":"worldeconomicforum","nickname":"World Economic Forum","avatarThumb":"https://p16-va-default.akamaized.net/img/musically-maliva-obj/1628353390516229~c5_100x100.jpeg","avatarMedium":"https://p16-va-default.akamaized.net/img/musically-maliva-obj/1628353390516229~c5_720x720.jpeg","avatarLarger":"https://p16-va-default.akamaized.net/img/musically-maliva-obj/1628353390516229~c5_1080x1080.jpeg","signature":"International Organization, committed to improving the state of the world","verified":true,"secUid":"MS4wLjABAAAAgEx3966_YUbYFKj_uooXzT2gb2EvV8NrdvJDKKPdxPjuH1XqPC_vEg7ZuUeM4GSY","secret":false,"relation":0,"openFavorite":false},"stats":{"followingCount":66,"followerCount":1235007,"heartCount":13830567,"videoCount":276,"diggCount":14,"heart":13830567},"shareMeta":{"title":"World Economic Forum on TikTok","desc":"@worldeconomicforum 1.0m Followers, 66 Following, 13.0m Likes - Watch awesome short videos created by World Economic Forum"}}}
Here's the base url for that account that doesn't seem to work.
https://m.tiktok.com/api/user/detail/?uniqueId=worldeconomicforum&language=en&verifyFp=
Update:
It seems like the issue is with any url that doesn't follow the format
https://m.tiktok.com/api/item_list/
As the links below don't seem to work
This link is used for probably more than just to get tiktoks by a music id, but that's what I'm using it for.
https://m.tiktok.com/share/item/list
Also with which is the initial reason for the issue.
https://m.tiktok.com/api/user/detail/
Edit: @mitchhymel helped figure out here that it seems to be an issue of Puppeteer being detected.
I'm trying to get list video of this user https://www.tiktok.com/@kannan17847/
i use like this to get signature
node browser.js "//www.tiktok.com/share/item/list?secUid=MS4wLjABAAAAz15wmO-nnCQp04UPEx2m7Yv0_-fJpBaXsk-uUNTsWTZGQa9NiYmAUpYJdAgbXhbF&id=6715464877845447682&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang="
> s0Ju9AAgEBCwzpufd4fScLNCb-AAO0V
but when run, i can not get data
https://www.tiktok.com/share/item/list?secUid=MS4wLjABAAAAz15wmO-nnCQp04UPEx2m7Yv0_-fJpBaXsk-uUNTsWTZGQa9NiYmAUpYJdAgbXhbF&id=6715464877845447682&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang=&_signature=s0Ju9AAgEBCwzpufd4fScLNCb-AAO0V
And api still working with true signature
https://www.tiktok.com/share/item/list?secUid=MS4wLjABAAAAz15wmO-nnCQp04UPEx2m7Yv0_-fJpBaXsk-uUNTsWTZGQa9NiYmAUpYJdAgbXhbF&id=6715464877845447682&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang=&_signature=SpOS3AAgEBSmr-nu7y6.OUqTk8AABTL
Title.
I tried it with your example, but that didn't seem to work?
I'm getting this error when running the listen.js file
TikTok Signature server started (node:4574) UnhandledPromiseRejectionWarning: Error: Protocol error (Playwright.createContext): Browser has been closed. at /home/user/tiktok1/node_modules/playwright-core/lib/webkit/wkConnection.js:102:63 at new Promise (<anonymous>) at WKSession.send (/home/user/tiktok1/node_modules/playwright-core/lib/webkit/wkConnection.js:101:16) at WKBrowser.newContext (/home/user/tiktok1/node_modules/playwright-core/lib/webkit/wkBrowser.js:65:65) at WKBrowser.<anonymous> (/home/user/tiktok1/node_modules/playwright-core/lib/helper.js:64:31) at Signer.init (/home/user/tiktok1/tiktok-signature/index.js:48:39) (node:4574) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:4574) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
help me please convert it to java code =(
i want to use it in my android app. but don't understand js...
I think they have updated their signature generation again. The current code doesnt work.
Help @carcabot :(
Hello,
Tiktok has made some recent changes to their generation of signatures, after which your code does not work. Can you please look into it?
I tried to use listen.js
to make an api for remote calling, but it only can run once, then it would return same signature.
I solved this problem via child_process to run browser.js for every request, but seems not so good, what can I do else? And who knows that can I run it with serverless, maybe better on AWS Lambda...
thx
If I open the resulting URL in Chrome I get the normal response. But in python it fails with
Traceback (most recent call last): File "trend.py", line 15, in <module> data = request.json() File "/Library/Python/2.7/site-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded
Basically the response is empty when you get it via Python. Is there something to change in the headers?
Following is the url I am trying to generate the URL with
node browser.js "https://m.tiktok.com/share/item/list?secUid=MS4wLjABAAAAiWABcA0z8O_trkXaALB5r2El1C8oUVABE3dGlt8AnxY&id=16631823&type=1&count=30&minCursor=0&maxCursor=0&shareUid="
s0Ju9AAgEBCwzpufd4evy7NCb-AAO0V
The user agent used for getting the info of the user is the same as being sent in the final request with signature but it doesnt work.
I cloned the repo, installed the required packages and ran node listen.js
, which resulted in the following error:
PS C:\Users\robin\source\repos\tiktok-signature> node .\listen.js
TikTok Signature server started
(node:416) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: window.webpackJsonp is not iterable
at __puppeteer_evaluation_script__:4:28
at ExecutionContext._evaluateInternal (C:\Users\robin\source\repos\tiktok-signature\node_modules\puppeteer\lib\ExecutionContext.js:122:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async ExecutionContext.evaluate (C:\Users\robin\source\repos\tiktok-signature\node_modules\puppeteer\lib\ExecutionContext.js:48:12)
at async Signer.init (C:\Users\robin\source\repos\tiktok-signature\index.js:73:5)
-- ASYNC --
at ExecutionContext.<anonymous> (C:\Users\robin\source\repos\tiktok-signature\node_modules\puppeteer\lib\helper.js:111:15)
at DOMWorld.evaluate (C:\Users\robin\source\repos\tiktok-signature\node_modules\puppeteer\lib\DOMWorld.js:112:20)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
-- ASYNC --
at Frame.<anonymous> (C:\Users\robin\source\repos\tiktok-signature\node_modules\puppeteer\lib\helper.js:111:15)
at Page.evaluate (C:\Users\robin\source\repos\tiktok-signature\node_modules\puppeteer\lib\Page.js:860:43)
at Page.<anonymous> (C:\Users\robin\source\repos\tiktok-signature\node_modules\puppeteer\lib\helper.js:112:23)
at Signer.init (C:\Users\robin\source\repos\tiktok-signature\index.js:73:21)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:416) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:416) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Do you have any idea why "window.webpackJsonp is not iterable", since it was working before? Did TikTok change stuff again?
Just noticed the local http server logged this error into the console, I'm unsure what caused this as I was not monitoring the system at the time of the error, but it does result in browser.js failing to produce a valid token. The stacktrace, unfortunately in a bad format, below:
Is it possible that the js file could require some extra error handling to prevent crashes like this?
If it's of any more help, I tried manually executing browser.js and it returned this error:
Line 48 in index.js for me is await this.page.goto("http://tiktok.com:8080/index.html", {
is it possible to host this script on Heroku or google App engine?. Also it would be nice to have it return a json output like a proper api call.
Am an Android / Ios Dev and am not too familiar with backend technology
Great library btw
Generated tokens are not working anymore. It started on Jan 9. Seems tiktok has changed the way they are generating tokens again. Can someone provide a fix for this? Thanks
When using webkit or firefox with playwright, by default, pages are not muted, which means that the trending page's audio starts to play when the signer is initiated.
I know that chromium has a "--mute-audio" startup flag, but I see that you are using webkit instead; which of I could not find the equivalent flag.
Would it be safe to switch over to chromium, or maybe find a way to mute a page in webkit?
Hi! I want to generate new signature every request using rotating proxy. How can I do this?
Hi,
on my local server, it works well but in production, it goes in timeout.
Can my server's IP be banned? How I can test it?
Thank you!
I receive this error message:
node node_modules/tiktok-signature/browser.js "https://m.tiktok.com/api/item_list/?count=20&id=6751746612202537990&type=1&maxCursor=0&minCursor=0&sourceType=8&appId=1233®ion=IT&language=it&verifyFp="
TimeoutError: Navigation timeout of 30000 ms exceeded
at /home/forge/###/node_modules/puppeteer/lib/LifecycleWatcher.js:100:111
-- ASYNC --
at Frame.<anonymous> (/home/forge/###/node_modules/puppeteer/lib/helper.js:94:19)
at Page.goto (/home/forge/###/node_modules/puppeteer/lib/Page.js:476:53)
at Page.<anonymous> (/home/forge/###/node_modules/puppeteer/lib/helper.js:95:27)
at Signer.init (/home/forge/###/node_modules/tiktok-signature/index.js:63:21)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async main (/home/forge/###/node_modules/tiktok-signature/browser.js:8:9)
I'm having trouble using it as an API.. After sending 100 requests, the server shuts down itself..
When I require on my project the Signer like -> const Signer = require('tiktok-signature') I keep getting the error "ReferenceError: generateSignature is not defined"...
i'm doing this:
const express = require('express');
const app = express();
const axios = require('axios');
const PORT = 8080;
const Signer = require('tiktok-signature');
app.get('/', async (req, res) => {
const signer = new Signer("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36");
await signer.init();
const token = await signer.sign("https://m.tiktok.com/share/item/list?secUid=&id=xxxxxxxx&type=3&count=30&minCursor=0&maxCursor=0&shareUid=&lang=");
await signer.close();
res.send(token);
});
app.listen(process.env.PORT || PORT, () => {
console.log('Server is running on port:', PORT);
})
please help, maybe i'm doing something wrong
I am a front end developer and I am wondering if there's a way I can implement this to track tiktok account stats, thanks!
After running node listen.js I get result:
`/home/ubuntu/workspace/nodetiktok/node_modules/tiktok-signature/index.js:9
userAgent =
^
SyntaxError: Unexpected token =
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/home/ubuntu/workspace/nodetiktok/node_modules/tiktok-signature/listen.js:1:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)`
Hi! First of all thanks for sharing this, it's really helpful.
I'm trying to run the program like this:
node browser.js "https://m.tiktok.com/node/video/feed"
and this is throwing this error:
userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'
SyntaxError: Unexpected token =
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/mathi/Escritorio/tiktokapi/tiktok-signature/browser.js:1:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
I'm pretty new with node-js so it might be because of some really basic error I made. Please let me know if anyone experienced the same or if you know what could be the problem :) Thanks!
Hey ! I have read the all the source files, and wanted first to say it's very impressive to see this solution :) great work !
So what I wanted to ask is can you may add references (links, docs) about:
maybe I'm missed that. but the main goal for me is to understand something when I use it, in case it breaks - I maybe can help out.
(Just to be clear, I'm not experienced in this area, but I want to get better, so basically asking for a starting point by getting more information about this rep)
and @carcabot if there is a way I can contact you out of github it'd be awesome.
Hi,
I am trying to get _signature
for two endpoints
https://m.tiktok.com/api/user/detail/?uniqueId=someuser&language=en&verifyFp=&_signature
and
https://m.tiktok.com/share/item/listsecUid=someid&id=1234&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang=&verifyF p=&_signature=
I cloned your repo and started server
node server.js
and tried to run both these scripts signature.js
and browser.js
with endpoint.
node browser.js "https://m.tiktok.com/share/item/listsecUid=someid&id=1234&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang=&verifyFp=&_signature="
and
node signature.js "https://m.tiktok.com/share/item/listsecUid=someid&id=1234&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang=&verifyFp=&_signature="
I am getting the signature back but when I am hitting the request through curl with same signature with the endpoint, I am getting this response
{
"statusCode": 200,
"contentType": "application/json",
"content": ""
}
While hitting through curl I am using the same user-agent as it is there in browser.js
or signature.js
.
Any idea I am doing something wrong?
Your help will be highly appreciated.
Have just downloaded the updates to this repo and when I run
node listen.js
I get this error:
TikTok Signature server started
(node:23) UnhandledPromiseRejectionWarning: Error: Failed to launch browser: Error: spawn /app/.cache/ms-playwright/webkit-1219/pw_run.sh ENOENT
at ChildProcess. (/app/node_modules/playwright-core/lib/server/processLauncher.js:56:20)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:23) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:23) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Please help me
page.goto("http://tiktok.com:8080/index.html")
intend to get tac and set gobal.tac, but the Signer class has getTac()
method. Why don't direct to invoke getTac
method ?
can you update the signature.js ?
because not work again, but the browser.js still OK
i need the signature.js working again:(
maybe can use hashlib or some other lib?
I've hosted this on Heroku and can get the token response, but when I use the same token and specify the same user-agent, I get no response from any of the URL endpoints I am trying to access.
If I use a valid token it does work, but the token produced by this is not working. Any ideas?
Hello, i want like and subscribe in web version tiktok.... How generate signature?
What will the service url for likes look like?
What will the service url for subscribe look like?
You have helped many of us here a lot. You have been really fast at fixes and as soon as my service goes up again I would like to give you a bit of beer money. Maybe some others want to drop a coin as well.
Do you have a tip jar? If you are doing it completely free that is also very nice but maybe as a little gesture from us
After cloning the repository and installing dependencies, it happens when I try to run the server:
node listen.js
`c:\git\experiment\tiktok-signature\index.js:9
userAgent =
^
SyntaxError: Unexpected token =
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (c:\git\experiment\tiktok-signature\listen.js:1:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)`
Am I missing something?
Thank you!
This happens when I'm following the Installation instructions on the README:
$ npm i tiktok-signature
npm ERR! code ENOVERSIONS
npm ERR! No valid versions available for tiktok-signature
Hi,
It looks like TikTok changed something again because it was working fine, but now gives the following error:
tiktoksignature_1 | TikTok Signature server started
tiktoksignature_1 | (node:1) UnhandledPromiseRejectionWarning: Error: Evaluation failed: No function found
tiktoksignature_1 | at ExecutionContext._evaluateInternal (/usr/src/app/node_modules/puppeteer/lib/ExecutionContext.js:122:13)
tiktoksignature_1 | at processTicksAndRejections (internal/process/task_queues.js:97:5)
tiktoksignature_1 | at async ExecutionContext.evaluate (/usr/src/app/node_modules/puppeteer/lib/ExecutionContext.js:48:12)
tiktoksignature_1 | at async Signer.init (/usr/src/app/index.js:71:5)
tiktoksignature_1 | -- ASYNC --
tiktoksignature_1 | at ExecutionContext.<anonymous> (/usr/src/app/node_modules/puppeteer/lib/helper.js:111:15)
tiktoksignature_1 | at DOMWorld.evaluate (/usr/src/app/node_modules/puppeteer/lib/DOMWorld.js:112:20)
tiktoksignature_1 | at processTicksAndRejections (internal/process/task_queues.js:97:5)
tiktoksignature_1 | -- ASYNC --
tiktoksignature_1 | at Frame.<anonymous> (/usr/src/app/node_modules/puppeteer/lib/helper.js:111:15)
tiktoksignature_1 | at Page.evaluate (/usr/src/app/node_modules/puppeteer/lib/Page.js:860:43)
tiktoksignature_1 | at Page.<anonymous> (/usr/src/app/node_modules/puppeteer/lib/helper.js:112:23)
tiktoksignature_1 | at Signer.init (/usr/src/app/index.js:71:21)
tiktoksignature_1 | at processTicksAndRejections (internal/process/task_queues.js:97:5)
tiktoksignature_1 | (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
tiktoksignature_1 | (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hello! Can't generate true signature for getting videos bu hashtag.
Getting this url with signature, generated for it, returns empty page:
https://m.tiktok.com/share/item/list?secUid=&id={hashtag id here}&type=3&count=30&minCursor=0&maxCursor=0&shareUid=&lang=&verifyFp=
itemInfos got from "/share/item/list", hava a video url. But the url indicates a video with watermark, do you know how to get video url without watermark.
thk u!
It was working till February 12th.But today when I tried it its not working.Even the trending.py script is not working.Its just returning {'statusCode': 200, 'contentType': 'application/json', 'content': ''}
Hello, it's great to have other developers working on the api for tiktok :)
I generated a signature but it's invalid, in the read.me file it's suggest to replace the tac token in the signature.js file, but i didn't find the right way.
Can you explain this step with more details ?
Thank you and happy holidays
I had it running overnight, but after about ~12-14 hours of listening non-stop, I suspect it started generating incorrect keys?
Is something like this possible?
Reason that I'm asking this is because after restarting the local server I was getting data again.
hi, after installing and running listen.js i get this error:
TikTok Signature server started
Received url: https://m.tiktok.com/share/item/list?secUid=&id=&type=5&count=30&minCursor=0&maxCursor=0&shareUid=
Error: Evaluation failed: ReferenceError: generateSignature is not defined
at __puppeteer_evaluation_script__:1:1
at ExecutionContext._evaluateInternal (/root/test/node_modules/puppeteer/lib/ExecutionContext.js:56:23)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async ExecutionContext.evaluate (/root/test/node_modules/puppeteer/lib/ExecutionContext.js:33:16)
at async Signer.sign (/root/test/node_modules/tiktok-signature/index.js:98:15)
at async IncomingMessage.<anonymous> (/root/test/node_modules/tiktok-signature/listen.js:38:27)
-- ASYNC --
at ExecutionContext.<anonymous> (/root/test/node_modules/puppeteer/lib/helper.js:94:19)
at DOMWorld.evaluate (/root/test/node_modules/puppeteer/lib/DOMWorld.js:89:24)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
-- ASYNC --
at Frame.<anonymous> (/root/test/node_modules/puppeteer/lib/helper.js:94:19)
at Page.evaluate (/root/test/node_modules/puppeteer/lib/Page.js:591:14)
at Page.<anonymous> (/root/test/node_modules/puppeteer/lib/helper.js:95:27)
at Signer.sign (/root/test/node_modules/tiktok-signature/index.js:98:31)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async IncomingMessage.<anonymous> (/root/test/node_modules/tiktok-signature/listen.js:38:27)
(node:6886) UnhandledPromiseRejectionWarning: TimeoutError: Navigation timeout of 30000 ms exceeded
at /root/test/node_modules/puppeteer/lib/LifecycleWatcher.js:100:111
-- ASYNC --
at Frame.<anonymous> (/root/test/node_modules/puppeteer/lib/helper.js:94:19)
at Page.goto (/root/test/node_modules/puppeteer/lib/Page.js:476:53)
at Page.<anonymous> (/root/test/node_modules/puppeteer/lib/helper.js:95:27)
at Signer.init (/root/test/node_modules/tiktok-signature/index.js:61:21)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:6886) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6886) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hello,
I think Tiktok made some improvements and so getting the data is not working anymore.
how to get video list by userid?
can you send me a example
After updating and installing node:
pi@chaengpi:~/scripts/tiktok-signature $ node -v
v10.19.0
I run into a problem when I try running the server.js script.
pi@chaengpi:~/scripts/tiktok-signature $ node server.js
/home/pi/scripts/tiktok-signature/index.js:9
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36";
^
SyntaxError: Unexpected token =
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/pi/scripts/tiktok-signature/server.js:1:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
I'm not getting much wiser from this error, do you perhaps know why it's causing this issue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.