python requests请求指定IP的域名


title: python requests请求指定IP的域名 date: 2022-02-25 13:54:36 categories:

  • IT技术
  • 编程语言
  • python tags:
  • IT技术
  • 编程语言
  • python

摘要:python版本的 import requests requests.get(‘https://192.168.100.4’,headers={‘Host’:’test.com’},verify=False) or import urllib2 req=urllib2.Request(‘https://192.168.199.4’,headers={‘Hos

python requests请求指定IP的域名

python版本的

import requests
requests.get('https://192.168.100.4',headers={'Host':'test.com'},verify=False)

or

import urllib2
req=urllib2.Request('https://192.168.199.4',headers={'Host':'test.com'})urllib2.urlopen(req)#urllib2  https会自动忽略证书

来源网址:https://blog.csdn.net/weixin_33965305/article/details/89835264

使用 Hugo 构建
主题 StackJimmy 设计