#coding":"utf-8 import requests import hashlib import time import random import json class Youdao(object): def __init__(self,word): self.url =' https":"//fanyi.youdao.com/translate_o?smartresult=dict&smartresult=rule' self.headers ={ 'User - Agent'":"' Mozilla / 5.0(Windows NT 10.0;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 96.0.4664.110Safari / 537.36Edg / 96.0.1054.62' 'Cookie': 'OUTFOX_SEARCH_USER_ID = -540175604 @ 10.108.160.133;OUTFOX_SEARCH_USER_ID_NCOO = 581892088.1527224;_ntes_nnid = ab0cb59ae64c847ebef8a24ff1b92329, 1637497122770;JSESSIONID = aaa5leUWhsTsv_RtTMH3x;___rl__test__cookies = 1640242400206' 'Referer'":" 'https: // fanyi.youdao.com /' } self,formata = None self,word = word def generate_formdata(self): '
Python 爬虫 代码不报错,也不显示爬取内容,求解
最新推荐文章于 2023-07-01 02:51:58 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)