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

Update scraper.py #225

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update scraper.py #225

wants to merge 1 commit into from

Conversation

chen-rn
Copy link

@chen-rn chen-rn commented Jul 17, 2023

修复一个BUG:如果你输入用户个人资料页面点入的video URL(如下),它无法返回任何用户 ID。
bug fix, if you enter a url that comes from the user profile page(like the following) it would not return any user id.

https://www.douyin.com/user/MS4wLjABAAAA6MgkojtAI7ZEK-vcJIly157umW6ANrtsAvk9QUar98XntKAYsFHO3WxCFLUYFWYI?modal_id=7222522822483103010

bug fix, if you enter a url that comes from the user profile page(like the following) it would not return any user id.

https://www.douyin.com/user/MS4wLjABAAAA6MgkojtAI7ZEK-vcJIly157umW6ANrtsAvk9QUar98XntKAYsFHO3WxCFLUYFWYI?modal_id=7222522822483103010
@Evil0ctal
Copy link
Owner

好的,感谢你的PR,我晚点review一下,如果没有问题的话就可以merge😊

# 个人主页
elif "user" in video_url:
# https://www.douyin.com/user/MS4wLjABAAAA6MgkojtAI7ZEK-vcJIly157umW6ANrtsAvk9QUar98XntKAYsFHO3WxCFLUYFWYI?modal_id=7222522822483103010
key = re.findall("modal_id=(\d+)", video_url)[0]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这一段貌似只处理了modal_id=存在在URL中的情况,是否可以使用urllib对URL进行拆分然后取值?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants