import urllib.request
import re
web=urllib.request.urlopen('https://www.gpyh.com/pricebuy/index?pageNum=1&hasStock=&goodsStandardId=1931&materialDictCode=&materialGroupCode=037001&diameter=&length=&brandId=&merchantId=')
neirong=web.read()
def getPage(self,pageIndex):
url = self.siteURL + "?pageNum=" + str(pageIndex)
request = urllib2.Request(url)
response = urllib2.urlopen(request)
return response.read().decode('gbk')
jiangrenhua=neirong.decode('UTF-8')
RegularExpression='<td>(.*)<\/td>'
Valuable=re.findall(RegularExpression,jiangrenhua)
information=[]
for i in range(173):
print(Valuable[i]
Isn’t this your page number control?
If you see it after logging in, use cookies or username and password to simulate logging in and get it
httplib2 should basically be the terminator of all http requests.