git clone https://github.com/Johnserf-Seed/TikTokWeb.git
cd TikTokWeb
npm i
npm start
http://localhost:4000/
docker pull johnserfseed/tiktokweb:latest
docker run -d -p 4000:<any port> tiktokweb
TikTokTool 网页版
License: Apache License 2.0
解析视频时报错
(node:11901) UnhandledPromiseRejectionWarning: Error: Request failed with status code 403
at createError (/home/pi/TiktokWeb/web/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/pi/TiktokWeb/web/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/home/pi/TiktokWeb/web/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:11901) 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(). (rejection id: 4)
您好,请问下如何打包啊,非前端,请赐教,感谢大佬
我看msToken在抖音网页中每次都会touch过期时间并且重新生成,TikTokWeb是不是要隔一段时间就要去更新一下?
解析出来非1080p 分辨率很低,希望可以有选项选择高清
好多链接无法解析,出现403,"blocked".
请问这个新增的cookie值哪里取的?想替换成自己的试试
例如readme里的两个示例视频用tool下都是720p的,但是用web下只有540p左右,不知道是不是我填了网页端的ttwid,我在官网上切换分辨率视频的清晰度和猫抓补货的文件大小也没有变化,不知道你们有没有这个问题。
另外部分视频下载报错,但是报错的链接用idm能下载完成:
https://v.douyin.com/iRfMLJbr/
downloadFile.js:38 GET https://v2v12sztpcw02000833spku3vap6ny4va.free-lbv3.idouyinvod.com/v3-cold4.douyinvod.com/7c559343e42f46791e0da24f764f193a/655516c0/video/tos/cn/tos-cn-ve-15c001-alinc2/oANNISQiZPOPwBW3XMAXRAEMt0KQIg2gAiii4/?a=1128&ch=26&cr=3&dr=0&lr=all&cd=0%7C0%7C0%7C3&cv=1&br=280&bt=280&cs=2&ds=6&ft=H4Y7FvvBQOBULry_8Z.BOMzJ4lcMEddK2bL1YHZb8Zmka&mime_type=video_mp4&qs=11&rc=Nzs0OTdmNzdnODw5OTNoOEBpM2Zxb245cmZybDMzNGkzM0BiMjZiYGJiXjAxXy81NC8wYSNlYmUzMmQ0LWpgLS1kLS9zcw%3D%3D&btag=10e000b8001&dy_q=1700070907&feature_id=e585bce62f14c124a0ac1450c3a95af2&l=202311160155077ABD082FF7BDAE42B4BE&ali_redirect_ex_hot=66666800&ali_redirect_ex_beacon=1 net::ERR_FAILED 200 (OK) proceedDownload @ downloadFile.js:38 (anonymous) @ downloadFile.js:66 Promise.then (async) checkFileSizeAndDownload @ downloadFile.js:34 (anonymous) @ downloadFile.js:22 Promise.then (async) downloadFile @ downloadFile.js:19 (anonymous) @ api?url=https://v.douyin.com/iRfMLJbr/:263 dispatch @ jquery.min.js:2 y.handle @ jquery.min.js:2 api:1 Uncaught (in promise) TypeError: Failed to fetch Promise.then (async) proceedDownload @ downloadFile.js:40 (anonymous) @ downloadFile.js:66 Promise.then (async) checkFileSizeAndDownload @ downloadFile.js:34 (anonymous) @ downloadFile.js:22 Promise.then (async) downloadFile @ downloadFile.js:19 (anonymous) @ api?url=https://v.douyin.com/iRfMLJbr/:263 dispatch @ jquery.min.js:2 y.handle @ jquery.min.js:2
依然无法下载1080p视频
node:internal/process/promises:288
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 "undefined".] {
code: 'ERR_UNHANDLED_REJECTION'
}
那里的问题?
root@localhost:~/TikTokWeb# npm start http://localhost:4000/
[email protected] start
nodemon ./bin/www "http://localhost:4000/"
[nodemon] 2.0.20
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node ./bin/www http://localhost:4000/
GET / 304 34.103 ms - -
GET /static/stylesheets/milligram.min.css 304 11.155 ms - -
GET /static/stylesheets/progress.css 304 4.214 ms - -
GET /static/stylesheets/unicons.css 304 4.068 ms - -
GET /static/javascripts/jquery.cookie.min.js 200 57.229 ms - 1301
GET /static/javascripts/jquery.min.js 200 53.901 ms - 89795
GET /static/javascripts/jszip.min.js 200 69.167 ms - 97630
GET /static/javascripts/FileSaver.min.js 200 58.540 ms - 2749
GET /static/javascripts/progress.js 200 59.108 ms - 1321
GET /static/fonts/unicons.woff2 200 7.955 ms - 143000
{"odin_tt":"94709eec8aca4ab392e54ba33aced8f191590dd11d625e62493fc2152b1e72174d3f274b2a1e53059921090ad7517d62ae93","passport_csrf_token":"d529c6921bf2090e4192f72d56ac","sessionid_ss":"ad8f2b679ffb4fcc101eab54541432e0\t","ttwid":"verify_lj870qjm_CG0sJlEa_Bo0w_4qG5_BLF8_BaG7u6o3M3RR","msToken":"VF1Vy74v2AeVIEIg6YXlodhMB6P-5BOKVuBxggDSdyNVxRBCJOLtJwgNw_D8er3mEjma3eTuO0SVJlLyh5w=="}
open shorturl ok
作品id 7086787906316094735
https://www.douyin.com/aweme/v1/web/aweme/detail/?aweme_id=7086787906316094735&aid=1128&version_name=23.5.0&device_platform=android&os_version=2333&X-Bogus=DFSzswVuTzGANxXhtn4hKl9WX7jQ
open url ok
GetInfo ok
TypeError: response.data.aweme_detail.desc.replaceAll is not a function
at /root/TikTokWeb/routes/api.js:97:68
at processTicksAndRejections (internal/process/task_queues.js:97:5)
TypeError: response.data.aweme_detail.desc.replaceAll is not a function
at /root/TikTokWeb/routes/api.js:97:68
at processTicksAndRejections (internal/process/task_queues.js:97:5)
GET /api?url=https://v.douyin.com/NKyY6Ch/ 304 20800.254 ms - -
(node:12293) UnhandledPromiseRejectionWarning: ReferenceError: reject is not defined
at GetInfo (/root/TikTokWeb/routes/api.js:127:9)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:12293) 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:12293) [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.
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ServerResponse.setHeader (_http_outgoing.js:530:11)
at ServerResponse.header (/root/TikTokWeb/node_modules/express/lib/response.js:794:10)
at ServerResponse.contentType (/root/TikTokWeb/node_modules/express/lib/response.js:624:15)
at ServerResponse.send (/root/TikTokWeb/node_modules/express/lib/response.js:149:14)
at done (/root/TikTokWeb/node_modules/express/lib/response.js:1035:10)
at tryHandleCache (/root/TikTokWeb/node_modules/ejs/lib/ejs.js:280:5)
at View.exports.renderFile [as engine] (/root/TikTokWeb/node_modules/ejs/lib/ejs.js:491:10)
at View.render (/root/TikTokWeb/node_modules/express/lib/view.js:135:8)
at tryRender (/root/TikTokWeb/node_modules/express/lib/application.js:657:10)
at Function.render (/root/TikTokWeb/node_modules/express/lib/application.js:609:3) {
code: 'ERR_HTTP_HEADERS_SENT'
}
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ServerResponse.setHeader (_http_outgoing.js:530:11)
at ServerResponse.header (/root/TikTokWeb/node_modules/express/lib/response.js:794:10)
at ServerResponse.contentType (/root/TikTokWeb/node_modules/express/lib/response.js:624:15)
at ServerResponse.send (/root/TikTokWeb/node_modules/express/lib/response.js:149:14)
at done (/root/TikTokWeb/node_modules/express/lib/response.js:1035:10)
at tryHandleCache (/root/TikTokWeb/node_modules/ejs/lib/ejs.js:280:5)
at View.exports.renderFile [as engine] (/root/TikTokWeb/node_modules/ejs/lib/ejs.js:491:10)
at View.render (/root/TikTokWeb/node_modules/express/lib/view.js:135:8)
at tryRender (/root/TikTokWeb/node_modules/express/lib/application.js:657:10)
at Function.render (/root/TikTokWeb/node_modules/express/lib/application.js:609:3)
GET /static/stylesheets/404.css 304 4.661 ms - -
我看里面的CDN都失效了,也没有在处理,不改下这项目是用不了了
docker 报错了
ReferenceError: reject is not defined
at GetInfo (F:\New project\TikTokWeb\TikTokWeb\routes\api.js:125:9)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.15.0
[nodemon] app crashed - waiting for file changes before starting...
发现每次换浏览器后都需要重新填入cookies等,操作起来比较麻烦。希望能增加环境变量或者其他方式,在docker部署的时候,预填入所有配置。
我记得刚使用的时候,我只要放一个cookie值:ttwid 就能正常解析
这几天测试,发现放全也提示"抖音的cooki无效,请重新填写"
大佬 是这个接口不行了吗?
如题,一开始在docker中部署可以正常解析,使用了大概2天后就不行了,解析时提示:抖音的cooki无效,请重新填写
但是我并没有改变任何东西,是什么原因呢?
建议提供一个docker镜像。
系统环境,win10
node 版本:v14.16.1
bower : 无法加载文件 C:\Users\name\AppData\Roaming\npm\bower.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 http
s:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ bower install
+ ~~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
ERR_UNHANDLED_REJECTION
F:\TikTokWeb>npm start
[email protected] start
nodemon ./bin/www
[nodemon] 2.0.20
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node ./bin/www
GET / 200 4.803 ms - 8302
open shorturl ok
https://v.douyin.com/6qeBVPV/
https://www.iesdouyin.com/share/user/MS4wLjABAAAA9v-ve_UHoqbKFNoBtQaFzRqRnel0LO5iagq6Azskot8?did=MS4wLjABAAAAAigLg1Dr2-7BHgScPHpIsZCK4rMCIVnWJ88b8HCPmgu3N0Nx-POymp-AtRoW5O-j&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&sec_uid=MS4wLjABAAAA9v-ve_UHoqbKFNoBtQaFzRqRnel0LO5iagq6Azskot8&from=web_code_link
TypeError: Cannot read properties of null (reading '1') item_ids获取错误
GET /api?url=https://v.douyin.com/6qeBVPV/ 200 999.428 ms - 883
F:\TikTokWeb\routes\api.js:27
next(error)
^
ReferenceError: next is not defined
at F:\TikTokWeb\routes\api.js:27:17
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[nodemon] app crashed - waiting for file changes before starting...
请问这个问题怎么解决?
docker: Error response from daemon: pull access denied for tiktokweb, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
执行npm start后错误提示如下:
$ npm start
[email protected] start
nodemon ./bin/www
[nodemon] 2.0.15
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node ./bin/www
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'http-errors'
Require stack:
6月28日,使用docker运行,刚开始可以成功解析。后面就不行了,试过换cookie,还是不行。
巨佬, 我用electron 写了个客户端, 可以推荐一下吗
https://github.com/Journey98/TikTokWeb-electron
下载链接的地址 域名总是变怎么处理哈
root@localhost:~/TikTokWeb# npm start
[email protected] start /root/TikTokWeb
nodemon ./bin/www
/root/TikTokWeb/node_modules/update-notifier/index.js:58
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/root/TikTokWeb/node_modules/nodemon/bin/nodemon.js:15:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: nodemon ./bin/www
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-04-30T14_09_21_009Z-debug.lo
2022-04-30T13_59_12_853Z-debug.log
g
建议作者放弃对全平台的支持,专注做好一个平台即可。
目前来说,我这边测试下来,只有windows平台是可以正常使用的(但是二维码也是无法扫描,得手动贴cookie),其余平台都无法正常使用。
相较于全平台来说,为大家提供一个稳定可运行的软件更重要。另外,跨平台的问题,可以让用户通过安装虚拟机等解决,确实没有必要耗费太大的精力。
非常感谢作者提供的强大工具
建议做dockerfile,这样会更方便
2023-10-5 用新的的docker镜像
解析主页就是 404 走丢了,这不是你该来的地方。
docker日志提示:
URL格式不匹配任何已知模式
Error: Error with status code: 5
示例视频链接:https://v.douyin.com/ieofmV5v/
后台异常如下:
TypeError: Cannot read property 'play_url' of undefined
at GetInfo (D:\Softwares\TikTok\TikTokWeb-main\utils\douyinService.js:78:26)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async D:\Softwares\TikTok\TikTokWeb-main\routes\api.js:40:27
GET /api?url=https://v.douyin.com/ieofmV5v/ 500 963.420 ms - 861
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.