* coding : utf-8 *
@Time : 2021/11/25 15:14
@Author : Harken
适用场景:数据采集时候,绕过登录
个人信息页面是ut-8 但是还报错, 因为并没有进入个人信息页面
登录页面不是utf-8 所以报错
import urllib.request
url = ‘https://weibo.com/5638695973/L37xPeSDk’
headers = {
‘user-agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36’
‘cookie’:‘XSRF-TOKEN=dapugYbDpR5gJ5pmGYI4bUPO; login_sid_t=3ee02dfc1f9454a1f39d19069cdd5164; cross_origin_proto=SSL; WBStorage=5fd44921|undefined; _s_tentry=weibo.com; wb_view_log=1920*10801; Apache=324687385244.0557.1637824675544; SINAGLOBAL=324687385244.0557.1637824675544; ULV=1637824675584:1:1:1:324687385244.0557.1