- import scrapy
- class coniferspider(scrapy.Spider):
- name = "conifers"
- allowed_domian = ['httpbin.org/ip']
- start_urls = ['https://httpbin.org/ip']
- def parse(self, response):
- filename = response.url.split("/")[-2] + '.html'
- with open(filename,'wb') as f:
- f.write(response.body)