我想从路由器获取页面192.168.1.1 /basic/home_dhcplist.htm
,但它在开始时要求输入用户名和密码。如何从Python访问受密码保护的路由器页面?
我通过urllib2的
import urllib2
response = urllib2.urlopen('http://192.168.1.1/basic/home_dhcplist.htm')
html = response.read()
str="Prasads"
value= html.find(str)
print value
if value!=-1 :
print "found"
else:
print "not found"
response.close()
路由器的细节将不胜感激 –