使用Python grab fram单击Github上的follow按钮

2024-09-28 13:22:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图跟踪使用pythongrab框架的人,但是我不知道如何单击follow按钮。到目前为止,我的代码发送了一个post请求https://github.com/users/follow?target={username},但是由于某些原因它不能工作。在

user_url = "http://github.com/{username}"
g.go(user_url)
g.setup(method="post")

g.request(url="https://github.com/users/follow?target={username}", post={'target': '{username}'})

g.doc.save('x.html')

Tags: 代码httpsgithubcom框架urltargetusername

热门问题