# -*- coding:utf-8 -*- import requests from bs4 import BeautifulSoup url = "http://top.baidu.com/buzz?b=1&fr=topindex" header = { "user-agent": "Mozil ...
分类:
其他好文 时间:
2020-07-06 16:29:50
阅读次数:
414
# 测试浏览器弹窗的验证: import requests from urllib import parse import logging logging.basicConfig(level=logging.INFO) class ScrapyManager(object): def __init_ ...
分类:
编程语言 时间:
2020-07-05 19:07:10
阅读次数:
71
1.京东商品页面爬取 打开某一个京东页面 https://item.jd.com/69336974189.html 代码: import requests url="https://item.jd.com/69336974189.html" try: r=requests.get(url) r.ra ...
分类:
编程语言 时间:
2020-07-05 13:35:26
阅读次数:
65
旁边大佬让我重新写一个某XX监控脚本 需要请求https遇到了如下的问题 花了一下午解决这个问题。。。 害太菜,。。。。 遇到的问题: requests.post 发送https请求的时候报错 解决方法加上verify=False 还报错继续处理 857: InsecureRequestWarnin ...
分类:
编程语言 时间:
2020-07-05 12:03:39
阅读次数:
110
import json import pymysql import requests from bs4 import BeautifulSoup import datetime url = 'https://ncov.dxy.cn/ncovh5/view/pneumonia?from=timelin ...
分类:
其他好文 时间:
2020-07-05 10:57:17
阅读次数:
64
数据爬取 代码: Yiqing.py from os import path import requests from bs4 import BeautifulSoup import json import pymysql import time from _ast import Try url = ...
分类:
其他好文 时间:
2020-07-05 10:36:14
阅读次数:
45
前言 一个人至少拥有一个梦想,有一个理由去坚强。 一、httpx模块是什么? 一个用于http请求的模块,类似于requests、aiohttp; 既能发送同步请求(是指在单进程单线程的代码中,发起一次请求后,在收到返回结果之前,不能发起下一次请求),又能发送异步请求(是指在单进程单线程的代码中,发 ...
分类:
编程语言 时间:
2020-07-05 01:05:18
阅读次数:
103
https://blog.csdn.net/u012935344/article/details/105577324 import requests res = requests.get(url=url, auth=('admin', 'admin')) # 元组中设置你的账号密码 print(re ...
分类:
其他好文 时间:
2020-07-05 00:21:24
阅读次数:
94
1.单文件上传 fiddler抓取接口请求,Inspectors->WebForms查看接口请求参数: 写成字典格式: key对应name对应的值,这里name='licfile' value第一个是文件名称,对应filename=‘TFC-Trial-5-OJ456465-20200609.lic ...
分类:
Web程序 时间:
2020-07-04 22:42:03
阅读次数:
159
import urllib.request; from bs4 import BeautifulSoup; response = urllib.request.urlopen("file:///C:/Users/junwei_zhou/Desktop/502/6.1/html.html"); htm ...
分类:
Web程序 时间:
2020-07-04 22:31:21
阅读次数:
78