from selenium import webdriver
import requests,re
d = webdriver.Chrome(‘/home/huangea/Downloads/chromedriver’)
d.get(‘http://web2.qq.com/webqq.html’)
all_cookies = d.get_cookies()
cookies = {}
for s in all_cookies:
cookies[s['name']] = s['value']
cookies
vfwebqq = re.findall(‘vfwebqq=(\d+)’,d.page_source,re.S)
vfwebqq = re.findall(‘vfwebqq=(\d+)’,d.page_source,re.S)
re.findall(‘class=”chatBox_groupMember_buddy ” uin=”(.*?)”‘,d.page_source,re.S)
h = {“Referer”:”http://s.web2.qq.com/proxy.html?v=20110412001&callback=1&id=3″}
url = “http://s.web2.qq.com/api/get_friend_uin2?tuin=%s&verifysession=&type=1&code=&vfwebqq=%s&t=%s” % (756313541,vfwebqq,int(time.time()))
res1 = requests.get(url,cookies=cookies,headers=h)
print res1.content
再次拜访,表示极大的支持