例如:百度输入ip查看是自己本机的ip,通过UA伪装成其他机器的ip,

爬虫代码:

 1 import scrapy
 2 
 3 
 4 class UatestSpider(scrapy.Spider):
 5     name = 'UATest'
 6     # allowed_domains = ['www.xxx.com']
 7     start_urls = ['https://www.baidu.com/s?wd=ip']
 8     def parse(self, response):
 9         with open('./ip.html','w',encoding='utf-8')as fp:
10             fp.write(response.text)
11             print('over!!!')
爬虫代码

相关文章:

  • 2021-12-19
  • 2022-01-09
  • 2021-04-19
  • 2022-01-23
  • 2021-09-22
  • 2021-09-13
  • 2022-01-14
  • 2022-01-24
猜你喜欢
  • 2022-12-23
  • 2021-08-28
  • 2021-11-29
  • 2021-08-10
  • 2021-06-24
相关资源
相似解决方案