{"_id":"@carcabot/tiktok-signature","_rev":"3-75c66d22084e607c6c3d9c416087fd1a","name":"@carcabot/tiktok-signature","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.2":{"name":"@carcabot/tiktok-signature","version":"1.0.2","keywords":[],"author":{"name":"carcabot"},"license":"MIT","_id":"@carcabot/tiktok-signature@1.0.2","maintainers":[{"name":"carcabot","email":"webmaster@carcabot.ro"}],"homepage":"https://github.com/carcabot/tiktok-signature#readme","bugs":{"url":"https://github.com/carcabot/tiktok-signature/issues"},"dist":{"shasum":"17ca78920c0293181411b09fc6edb772dcb04967","tarball":"https://registry.npmjs.org/@carcabot/tiktok-signature/-/tiktok-signature-1.0.2.tgz","fileCount":8,"integrity":"sha512-NOdxZCK9vCeRyKCF/R4/XoGvi6ut40XMyeK4cSxfVJg/544AFeSP4GM4oe3f9veKGTEelMan4bBmAytJ232XUg==","signatures":[{"sig":"MEUCIC1Up4nz53votH3K1TWSdTqbOpv4U0XYAy047GHyctLzAiEAiX7bZZzHlSPZlyzsygkC/xJubFipyWnaU1ZF46fGWvE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaAAcCRA9TVsSAnZWagAAazIP/jR9dcveyXXdEM99PoiR\njMG3sKE8lN53JwgW96ChkkifZAlmSw5cLmkwNQ0mb2VcjPHjb2NulmhGcr0n\n0jg0t0xfJtgUWWzE8HYAuvYTqmr8VMm1N2vImONyCXx+Sg03p03H5X4IlueR\nqk4/Np26WVlsQKhCpKromkgMBbE6Lt04LM2xdH+AfQs8BTflvyVoIbjtS0IJ\nufkkDnB2Oxe3y0DhroZdfjcdRDwEjcHsnOPUatUHRYZ1lKKd79SMtutcqyuX\nbUdboNQ0K9AcQzqhPonhrGRRY3WqPGbXK6QD2Nb0kDjtA8RYAwN0pIMH9RjT\nDSh4cFczyg+L0H+24JjrpBu0OUwvQjejsFf6SusFNr26GMXToATkzKv4POq+\nWsL8Jx/RkO5U2AG6FRu6FeV4MgeM5dIk8eZokgSLJTq5YGPgNzgWZixTKRFP\nSeZD3leInL+gBuLO8pK111EfiJnuA6/FtUaiuiBGQ13w6URzc9kMIwdjEtAG\nKfTqtjc728h2UP+WR7cycDh4tSwjfAEJ0ABD4RvZGUBdmMvVqXnHLHbq7IOo\nVVesxdku9d41mdpIwN1TydmXidvCEbDWiPRILRJPyX4R3KRIDARygGQ9BcEY\n2JTftjJBAbzMC4chwZoo7vMmzWFj5OQY5aPdDz/ZGj/3rjHiaMeVr4Rjfuqn\ngAqe\r\n=rRJA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"714670fdae4e65c06fd2a05ec9470bc9c81481af","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"carcabot","email":"webmaster@carcabot.ro"},"repository":{"url":"git+https://github.com/carcabot/tiktok-signature.git","type":"git"},"_npmVersion":"6.13.4","description":"Install `jsdom`","directories":{},"_nodeVersion":"12.14.0","dependencies":{"puppeteer":"^2.1.1","puppeteer-extra":"^3.1.9","puppeteer-extra-plugin-stealth":"^2.4.9"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/tiktok-signature_1.0.2_1583874075584_0.8273288936424903","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2020-03-10T21:01:15.336Z","modified":"2026-04-21T15:37:58.967Z","1.0.2":"2020-03-10T21:01:15.688Z"},"bugs":{"url":"https://github.com/carcabot/tiktok-signature/issues"},"author":{"name":"carcabot"},"license":"MIT","homepage":"https://github.com/carcabot/tiktok-signature#readme","keywords":[],"repository":{"url":"git+https://github.com/carcabot/tiktok-signature.git","type":"git"},"description":"Install `jsdom`","maintainers":[{"name":"carcabot","email":"webmaster@carcabot.ro"}],"readme":"## Installation\n\nInstall `puppeteer`\n\n```bash\nnpm i tiktok-signature\n```\n\n## Usage\n\n### Module\n\n```js\nconst Signer = require(\"tiktok-signature\"); // Import package\nconst signer = new Signer(); // Create new signer\nawait signer.init(); // Create page with. Returns promise\nawait signer.sign(\"tiktok url\"); // Get sign for your url. Returns promise\nawait signer.close(); // Close browser. Returns promise\n```\n\nYou can pass your desired User-Agent and tac on class creation.\n\n```js\nnew Signer(\"Mozilla\"); // Set User-Agent to Mozilla\nnew Signer(null, \"123\"); // Set tac to 123\n```\n\n### CLI\n\nInstall dependencies\n\n```bash\nnpm i puppeteer puppeteer-extra puppeteer-extra-plugin-stealth\n```\n\nNow you can generate the token using\n\n```bash\nnode browser.js \"tiktok url\" # service url\n```\n\nThe response tokne should look like this\n\n```sh\nroot@localhost: VIm6dAAgEBYZFjzZxqkSy1SJu2AAAlc\n```\n\nIf you cannot succeed with this token, replace `tac` token (`window.tac`) inside `local.html`.\n\n## Fetch service url\n\n### Trending or VideoFeed\n\n```\nhttps://m.tiktok.com/share/item/list?secUid=&id=&type=5&count=30&minCursor=0&maxCursor=0&shareUid=\n```\n\n### Comments\n\n```\nhttps://m.tiktok.com/share/item/comment/list?id=<owner id here>&count=50&cursor=0\n```\n\n### Video feed\n\n```\nhttps://m.tiktok.com/node/video/feed\n```\n\n## Testing\n\nYou can test it using\n\n```python\nimport requests\n\nsignature = \"s0Ju9AAgEBCwzpufd4dd9bNCb-AAO0V\"\n\nreferer = \"https://www.tiktok.com/@ondymikula/video/6757762109670477061\"\n\nurl = \"https://m.tiktok.com/share/item/list?secUid=&id=&type=5&count=30&minCursor=0&maxCursor=0&shareUid=\" + \\\n    \"&_signature=\" + signature\nrequest = requests.get(url, headers={\"method\": \"GET\",\n                                \"accept-encoding\": \"gzip, deflate, br\",\n                                \"Referer\": referer,\n                                \"user-agent\": \"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\"\n                                })\ndata = request.json()\nprint(data)\n```\n\n---\n\n**NOTE**\n\nIt's very important that the userAgent be the same when generate and when request for response.\n\n---\n\n## Contributing\n\nIf you have a better improvement to this code, let me know ;)\n\nHope it helps.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","readmeFilename":"README.md"}