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

遇到的问题和开发者更新说明贴 #311

Open
Johnserf-Seed opened this issue Feb 9, 2023 · 13 comments
Open

遇到的问题和开发者更新说明贴 #311

Johnserf-Seed opened this issue Feb 9, 2023 · 13 comments
Assignees
Labels
文献资料(documentation) 改进或补充文件(Improvements or additions to documentation) 小白必看(good first issue) 适合新手(Good for newcomers)

Comments

@Johnserf-Seed
Copy link
Owner

Johnserf-Seed commented Feb 9, 2023

关于此贴

此贴用于更新一些开发说明,和遇到的故障解决以及列出详细的问题提问交流

使用前请确保使用的是仓库最新推送的代码

关于如何提issues以及避免无效提问

没有任何详细的描述且问题可以在网上搜到以及以前解决过的issue,请不要随意提交。你不会得到任何的解决方案。
https://github.com/Johnserf-Seed/Stop-Ask-Questions-The-Stupid-Ways

关于终端

我用的是Windows Terminal 安装 Windows 终端
image

关于No module named 'xxx'

在项目文件夹空白处中按shift + 鼠标右键 选择在终端中打开在此处打开xxx shell
输入 pip install -r requirements.txt 安装项目依赖
如有其他依赖报错在此贴下回复

关于UnboundLocalError: local variable 'response' referenced before assignment

没有正确启动本地Server服务,确保正确安装Node.js,终端进入Util目录输入npm i安装node依赖,然后启动Server.bat即可

关于[WinError 10061] 由于目标计算机积极拒绝,无法连接xxxx

同上关于UnboundLocalError: local variable 'response' referenced before assignment一样的解决方法

关于更新

最近抖音更新非常频繁,所以本项目也在频繁更新。
Q:为什么用了更新的版本还是无法运行?
A:更新完之后exe需要同步打包才能应用更新或者和我更新的代码存在差异。

为了保证大家用的代码和我开发环境一致,Release 页面提供了最新打包好的exe文件的md5。
每次在TikTokTool中更新完之后用build.bat重新打包文件,或者直接使用py运行,才是最新可运行的版本。

关于网络

image

Q:为什么我用了代理还是出现网络不太通畅?
A:可能是github自己抽风,可以检查本地dns有无污染,向host文件填写代理ip后重置电脑网络缓存 ipconfig /flushdns 后再试。

推荐没有代理的人使用羽翼城大佬的工具 steamcommunity_302
image

关于配置文件

odin_ttsessionid_ssttwidpassport_csrf_tokenmsToken的值就可以了,如下

image

日志

镜像加速站替换更新链接

Flag Counter
更新于 2023/02/09 18:58

@an168ge
Copy link

an168ge commented Apr 11, 2023

能不能把conf.ini ,cookies 的配置范例,发一下,用于参考发现填写了多次还是一样的闪退

@Johnserf-Seed
Copy link
Owner Author

Johnserf-Seed commented Apr 11, 2023

odin_ttsessionid_ssttwidpassport_csrf_tokenmsToken

odin_tt=xxx;sessionid_ss=xxx;ttwid=xxx;passport_csrf_token=xxx;msToken=xxx;

@skyhhuc
Copy link

skyhhuc commented Apr 11, 2023

你好,请问我直接用pycharm运行你们tiktoktool.py,并且所有步骤都按照你上面的来,环境和node.js都安装了,但是一直报错Profile对象没有sec属性,请看截图,麻烦帮我指点一下是哪里出了问题,感谢230982440-d802f2b1-c7f3-4430-8499-960e77e99f6d.png

@skyhhuc
Copy link

skyhhuc commented Apr 11, 2023

https://www.tiktok.com/@cocosneaker0
这个是我设置的链接,然后cookie就按照conf.ini提示的那三个字段也都通过f12找到并填上去了。但是还是有那个问题,sec没有这个属性

@namedssy
Copy link

namedssy commented May 6, 2023

https://www.tiktok.com/@cocosneaker0 这个是我设置的链接,然后cookie就按照conf.ini提示的那三个字段也都通过f12找到并填上去了。但是还是有那个问题,sec没有这个属性

有解决吗 我也遇到这个问题了 是不是不能下载 tiktok 的视频?

@skyhhuc
Copy link

skyhhuc commented May 6, 2023

https://www.tiktok.com/@cocosneaker0 这个是我设置的链接,然后cookie就按照conf.ini提示的那三个字段也都通过f12找到并填上去了。但是还是有那个问题,sec没有这个属性

有解决吗 我也遇到这个问题了 是不是不能下载 tiktok 的视频?

要看中文。。。只是抖音而已,没有tiktok😂😂😂

@fungchunhoeasy
Copy link

Traceback (most recent call last):
File "F:\抖音视频下载\TikTokTool.py", line 32, in
profile.getProfile(cmd.setting())
File "F:\抖音视频下载\Util\Profile.py", line 84, in getProfile
datas = Util.XBogus('aid=6383&sec_user_id=%s&count=35&max_cursor=0&cookie_enabled=true&platform=PC&downlink=10' % (
File "F:\抖音视频下载\Util\XB.py", line 30, in init
self.getXbogus(url)
File "F:\抖音视频下载\Util\XB.py", line 50, in getXbogus
self.params = response["result"][0]["paramsencode"]
UnboundLocalError: cannot access local variable 'response' where it is not associated with a value

请问各位大神要怎么解决?
跪求!!!! 已经先运行server.bat

@Johnserf-Seed
Copy link
Owner Author

Traceback (most recent call last): File "F:\抖音视频下载\TikTokTool.py", line 32, in profile.getProfile(cmd.setting()) File "F:\抖音视频下载\Util\Profile.py", line 84, in getProfile datas = Util.XBogus('aid=6383&sec_user_id=%s&count=35&max_cursor=0&cookie_enabled=true&platform=PC&downlink=10' % ( File "F:\抖音视频下载\Util\XB.py", line 30, in init self.getXbogus(url) File "F:\抖音视频下载\Util\XB.py", line 50, in getXbogus self.params = response["result"][0]["paramsencode"] UnboundLocalError: cannot access local variable 'response' where it is not associated with a value

请问各位大神要怎么解决? 跪求!!!! 已经先运行server.bat

看过readme了吗,仔细阅读本帖就不会有这个问题了

@maxchiron
Copy link

Seed大大,请问现在-u参数是失效了吗?uid放conf.ini里可以正常下载,用-u的话,就会提示“获取用户数据失败,请从web端获取新ttwid填入配置文件”报错

Johnserf-Seed added a commit that referenced this issue Jun 9, 2023
由于接口变化大,如遇刷新cookie还是无法获取的情况可以注释referer键或切换网络环境清除缓存重试。
#437 #432 #403 #335 #330 #329 #311
@zhangzongwan
Copy link

image 卡在[ 提示 ]:用户的sec_id=MS4wLjABAAAA2dvvSlRH9phwjH21auoTpQ7bg_cCeRQhLe34EYN8gW8,无法下载

@keeper-jie
Copy link

keeper-jie commented Apr 19, 2024

是否不支持bilibili视频下载,我安装f2框架之后使用f2 bili -h显示未安装此模块,下载源码之后pip install -r requirement.txt之后还是显示未安装此模块,是否不支持bilibili视频爬取? @Johnserf-Seed

(tiktokdownload) D:\file\file\Win10Share\md\python\code\MediaCrawler\tiktokdownload\TikTokDownload-main>f2 bili -h
ERROR    Error: No module named 'f2.apps.bilibili'
Usage: f2 [OPTIONS] COMMAND [ARGS]...

Error: No such command 'bili'.

f2 dy -h是正常的

我查看了site-package中的f2源码,只有tiktok和douyin,可否在f2 -h中删去其它选项呢,我理解未实现的功能就不用放help中了,避免使用者浪费时间做无用功

@Johnserf-Seed
Copy link
Owner Author

是否不支持bilibili视频下载,我安装f2框架之后使用f2 bili -h显示未安装此模块,下载源码之后pip install -r requirement.txt之后还是显示未安装此模块,是否不支持bilibili视频爬取? @Johnserf-Seed

(tiktokdownload) D:\file\file\Win10Share\md\python\code\MediaCrawler\tiktokdownload\TikTokDownload-main>f2 bili -h
ERROR    Error: No module named 'f2.apps.bilibili'
Usage: f2 [OPTIONS] COMMAND [ARGS]...

Error: No such command 'bili'.

f2 dy -h是正常的

我查看了site-package中的f2源码,只有tiktok和douyin,可否在f2 -h中删去其它选项呢,我理解未实现的功能就不用放help中了,避免使用者浪费时间做无用功

readme和help的应用支持状态写的很清楚,这个这是告诉用户未来支持的平台,不知道有这么难理解吗?

@keeper-jie
Copy link

是否不支持bilibili视频下载,我安装f2框架之后使用f2 bili -h显示未安装此模块,下载源码之后pip install -r requirement.txt之后还是显示未安装此模块,是否不支持bilibili视频爬取? @Johnserf-Seed

(tiktokdownload) D:\file\file\Win10Share\md\python\code\MediaCrawler\tiktokdownload\TikTokDownload-main>f2 bili -h
ERROR    Error: No module named 'f2.apps.bilibili'
Usage: f2 [OPTIONS] COMMAND [ARGS]...

Error: No such command 'bili'.

f2 dy -h是正常的
我查看了site-package中的f2源码,只有tiktok和douyin,可否在f2 -h中删去其它选项呢,我理解未实现的功能就不用放help中了,避免使用者浪费时间做无用功

readme和help的应用支持状态写的很清楚,这个这是告诉用户未来支持的平台,不知道有这么难理解吗?

抱歉是我的问题,我认为help里面应该放已有的功能指令,readme放计划的feature,比如linux中的ls命令,不会help里面放没有实现的东西

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
文献资料(documentation) 改进或补充文件(Improvements or additions to documentation) 小白必看(good first issue) 适合新手(Good for newcomers)
Projects
None yet
Development

No branches or pull requests

8 participants