dig www.sina.com.cn
jupiter.sina.com.cn. 30 IN A 183.232.24.117
jupiter.sina.com.cn. 30 IN A 183.232.24.115
jupiter.sina.com.cn. 30 IN A 183.232.24.112
jupiter.sina.com.cn. 30 IN A 183.232.24.114
jupiter.sina.com.cn. 30 IN A 183.232.24.111
jupiter.sina.com.cn. 30 IN A 183.232.24.113
jupiter.sina.com.cn. 30 IN A 183.232.24.116
It means that the domain www.sina.com.cn can be parsed as one of seven ips as above.
I want to know which ip is exactly to be visited for the following codes.
import requests
source = 'http://www.sina.com.cn'
r = requests.get(source)
print(r.headers)
{'Server': 'nginx', 'Expires': 'Fri, 03 Feb 2017 06:41:23 GMT', 'Date': 'Fri, 03 Feb 2017 06:40:23 GMT', 'Age': '10', 'Content-Encoding': 'gzip', 'Content-Length': '133766', 'Content-Type': 'text/html', 'X-Cache': 'HIT from cmnet.xxg.18a4.34.spool.sina.com.cn', 'X-Powered-By': 'shci_v1.03', 'Vary': 'Accept-Encoding', 'Cache-Control': 'max-age=60', 'Last-Modified': 'Fri, 03 Feb 2017 06:40:00 GMT'}
There is no ip address info.
ping cmnet.xxg.18a4.34.spool.sina.com.cn
ping: unknown host cmnet.xxg.18a4.34.spool.sina.com.cn
Which ip address is being visited when to send a request to domain name www.sina.com.cn with above python codes? To open wireshark to monitor the process.
At this time www.sina.com.cn is parsed into 183.232.24.111,maybe next time it may be parsed into 183.232.24.117,no matter which one,i want it to be displayed by my python codes.
The ip will be changed from one into other in the range (183.232.24.111-183.232.24.117).