美文网首页
2020-03-11

2020-03-11

作者: 查尔德77 | 来源:发表于2020-03-11 10:40 被阅读0次

    def star(self,usrName,repoName):
        url = ''.join(['https://github.com/',usrName,'/',repoName,'/'])
        response = self.opener.open(url)
        html = response.read()
        token = self.re_auth.findall(html)[3][41:-3]
        formdata = {'utf-8':'✓','authenticity_token':token}
        data_encoded = urllib.urlencode(formdata)
        response = self.opener.open(url+'star',data_encoded)

相关文章

网友评论

      本文标题:2020-03-11

      本文链接:https://www.haomeiwen.com/subject/jbqqjhtx.html