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

Douyin 音频 No BGM found #49

Closed
joyzhang2022 opened this issue Jul 1, 2022 · 10 comments
Closed

Douyin 音频 No BGM found #49

joyzhang2022 opened this issue Jul 1, 2022 · 10 comments
Labels
Fixed This issue has been fixed but waiting for test to make sure its stable invalid This doesn't seem right

Comments

@joyzhang2022
Copy link

大佬,我试了几个抖音的链接,音频好像都没有获取到显示 No BGM found ,但视频里并不是原创音频是有第三方音频的

@Evil0ctal
Copy link
Owner

大佬,我试了几个抖音的链接,音频好像都没有获取到显示 No BGM found ,但视频里并不是原创音频是有第三方音频的

提供链接我看看

@joyzhang2022
Copy link
Author

8.23 sRx:/ 复制打开抖音,看看【猫猫影院的作品】# 创作灵感 你看我像沙雕吗?# 创作者扶持计划 # 伙... https://v.douyin.com/YE3o5BR/

@Evil0ctal Evil0ctal added the invalid This doesn't seem right label Jul 23, 2022
@joyzhang2022
Copy link
Author

9.94 BGi:/ 复制打开抖音,看看【不咋滴先森📷的作品】# 上饶周边游 夏天泡在满地星辰的无边泳池,吹着山谷... https://v.douyin.com/2bkN6qJ/

@Evil0ctal
Copy link
Owner

你好,检查了一下API发现里面没有返回BGM信息,我会想办法解决这个问题,但是只发现个别视频会出现这种情况。

@Jeffrey-deng
Copy link
Contributor

你好,检查了一下API发现里面没有返回BGM信息,我会想办法解决这个问题,但是只发现个别视频会出现这种情况。

https://api.douyin.wtf/api?url=https://v.douyin.com/6RHvnJq/
音乐信息基本都没有
在官方api里有,结构还是跟以前一样的

另外建议返回一个音乐的ID,就是刷抖音时点击右下角进去的那个音乐界面地址
"music_share_url": "https://www.iesdouyin.com/share/music/7139405539507079949",
这个是我弄的,从官方api里的可以得到ID,然后拼这个前缀就行了
这个的好处是想找同一个系列的视频,搜这个链接,就可以找到下载的同一个系列的视频了

@Evil0ctal
Copy link
Owner

好的,我一会儿去看一下音乐信息,晚点我会将音乐ID也添加到返回的字典里。
感谢提醒!

@Jeffrey-deng
Copy link
Contributor

Jeffrey-deng commented Sep 5, 2022

好的,我一会儿去看一下音乐信息,晚点我会将音乐ID也添加到返回的字典里。 感谢提醒!

找原因了,在scraper.py 236行,if判断成功后加个 break就行了

另外音乐ID已经有了,就是你返回的video_music_mid和album_music_mid,我觉得可以加个链接 https://www.iesdouyin.com/share/music/{mid}
这个链接会直接调用抖音app

@Evil0ctal
Copy link
Owner

好的,请问加break的意义是什么呢?如果方便的话可以麻烦你提交一个Pull request吗?
Thanks♪(・ω・)ノ

@Jeffrey-deng
Copy link
Contributor

好的,请问加break的意义是什么呢?如果方便的话可以麻烦你提交一个Pull request吗? Thanks♪(・ω・)ノ

修改了音乐链接找不到(scraper.py 循环里增加了break)

另外在返回里增加了两个字段

  1. share_url

  由于 https://v.douyin.com/6RHvnJq/ 这种格式的链接,同一个视频多次点击分享,会有不同的链接,但都指向的是同一个视频,
  而用aweme_id则会不变 https://www.iesdouyin.com/share/video/7139405476835364103,这种格式链接打开会直接调用抖音app

  1. music_share_url:

  方便同时搜索同一个系列视频,这种格式链接打开会直接调用抖音app打开音乐主页

我已经提交了Pull request,你看一下,
因为item_list这里面有很多其他字段,当跑到下一个字段的时候,你的else就把原来的数据给置为空了

@Evil0ctal
Copy link
Owner

好的,已经merge你的PR了,非常感谢!

@Evil0ctal Evil0ctal added the Fixed This issue has been fixed but waiting for test to make sure its stable label Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed This issue has been fixed but waiting for test to make sure its stable invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants