Esempio n. 1
0
 def request(self, url,i):
     content = request.get(url,10,'www.xicidaili.com','http://www.xicidaili.com/nn/'+str(i))
     content.encoding = 'utf-8'
     return content
Esempio n. 2
0
 def url_open(self,url):
   """
   爬取网页
   """
   req = request.get(url,5,'donghua.dmzj.com',None)
   return req
Esempio n. 3
0
 def requestbyproxy(self, url):
     content = request.get(url, 5, 'app.anitama.net',
                           'http://www.anitama.cn/')
     content.encoding = 'utf-8'
     return content