1

I am new to Scrapy and trying to follow this tutorial (https://www.pythongasm.com/introduction-to-scrapy/) in order to learn about it.

I scraped this page (https://newyork.craigslist.org/d/real-estate/search/rea) using the fetch command, but when i typed view(response) i was given the following error:

>>> view(response)
Start : this command could not be executed due to error: the system could not find the specified file.
In line:1 character:1
+ Start "file:///tmp/tmppjvn5nzf.html"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

When I inspected file:///tmp/tmppjvn5nzf.html I saw that the information from the page was scraped, but it wasn't assigned to the response object.

Do you know how can I solve this issue?

guiparo
  • 11
  • 1

1 Answers1

0

you should try and run the command

scrapy shell https://newyork.craigslist.org/d/real-estate/search/rea

that should give you a:

2020-06-17 13:05:02 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://newyork.craigslist.org/d/real-estate/search/rea> (referer: None)

message in your terminal. Then to test that it works, type something like:

response.css('.result-hood::text').getall()

to get all the locations of the in the listing of houses. You should be able to get this to work quite simply if you have any issues, I would recommend watching the YouTube tutorials from https://www.youtube.com/user/eupendras. They are very well explained tutorials and take you through learning Scrapy slowly.

Arch1234
  • 15
  • 4