摘要: import urllib.request import urllib.parse url = 'https://movie.douban.com/j/chart/top_list?type=5&interval_id=100%3A90&action=&start=0&limit=20' heade 阅读全文
posted @ 2021-11-05 19:23 Anonytt 阅读(28) 评论(0) 推荐(0) 编辑
摘要: import urllib.request import urllib.parse url = "https://fanyi.baidu.com/v2transapi?from=en&to=zh" #反爬的话Cookie才是关键,需要视情况保留 headers ={ 'Cookie': 'BIDUP 阅读全文
posted @ 2021-11-05 19:03 Anonytt 阅读(787) 评论(0) 推荐(0) 编辑
摘要: post请求百度翻译: 1 import urllib.request 2 import urllib.parse 3 url = "https://fanyi.baidu.com/sug" 4 headers ={ 5 'User-Agent':'Mozilla/5.0 (Windows NT 1 阅读全文
posted @ 2021-11-05 18:31 Anonytt 阅读(614) 评论(0) 推荐(0) 编辑
摘要: #引入库函数import urllib.requestimport urllib.parseurl = "https://www.baidu.com/s?wd="#为了反爬而设定的headers ={ 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64 阅读全文
posted @ 2021-11-05 18:09 Anonytt 阅读(142) 评论(0) 推荐(0) 编辑