Python
Python copied to clipboard
Python脚本。模拟登录知乎, 爬虫,操作excel,微信公众号,远程开机
拉勾做了防爬虫处理了
怎么回事,麻烦解决下
with open('pic/{}/{}'.format(text, link.split('/')[-1]), 'wb') as f: 应该是 with open('pic/{}/{}'.format(text, pic_link.split('/')[-1]), 'wb') as f:
update url 原先的失效了 add user agents防止被封 add time out 3秒超时,防止长时间僵死
def get_access_token(appid, secret): '''获取access_token,100分钟刷新一次''' url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={}&secret={}'.format(appid, secret) r = requests.get(url) parse_json = json.loads(r.text) global token token = parse_json['access_token'] global timer timer = threading.Timer(6000, get_access_token) //这地方没有传参数。 timer.start()
如何实现发送短信功能
如题
正则表达式出错
这句代码的正则表达式有问题,不知你们测试没有!匹配不到内容 `star_num = star.find(text=re.compile('评价')) # 评价` 匹配的内容: 13 忠犬八公的故事 / Hachi: A Dog's Tale / 忠犬小八(台) / 秋田犬八千(港) [可播放] 导演: 莱塞·霍尔斯道姆 Lasse Hallström 主演: 理查·基尔 Richard Ger... 2009 / 美国 英国 / 剧情 9.2 504045人评价 永远都不能忘记你所爱的人。