|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
https://www.juliangip.com/agent
可以检测ip,
我做了个爬虫,
- from urllib.request import *
- from urllib.parse import *
- url = 'https://www.juliangip.com/checkAgent'
- data = {}
- data['type']: 'http'
- data['ipPort']: '47.105.91.226:8118'
- head = {}
- head['user-agent'] = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.39 Safari/537.36 Edg/104.0.1293.21'
- data = urlencode(data).encode('utf-8')
- req = Request(url,data,head)
- xx = urlopen(req)
- html = xx.read().decode('utf-8')
- print(html)
复制代码
- rom urllib.request import *
- from urllib.parse import *
- url = 'https://www.juliangip.com/checkAgent'
- data = {}
- data['type'] = 'http'
- data['ipPort'] = '47.105.91.226:8118'
- head = {}
- head['user-agent'] = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.39 Safari/537.36 Edg/104.0.1293.21'
- data = urlencode(data).encode('utf-8')
- req = Request(url,data,head)
- xx = urlopen(req)
- html = xx.read().decode('utf-8')
- print(html)
复制代码
|
|