0

I'm trying to scrape details from this page using Scrapy: link

This is the command I am using to pull the Title but it is throwing an error:

response.css('#intitule > div.nom_fugitif::text').extract_first()

This is the error:


AttributeError Traceback (most recent call last) in ()

----> 1 response.css('#intitule > div.nom_fugitif::text').extract_first()

AttributeError: 'NoneType' object has no attribute 'css'

It says the div has no CSS but I'm not sure what that means because it does have a CSS class.

Shankar
  • 2,890
  • 3
  • 25
  • 40
TinyTiger
  • 1,801
  • 7
  • 47
  • 92

1 Answers1

0

NoneType means you're actually getting None in your response. You can check with

if response is not None: