Ivanov Anton
Ivanov Anton

Reputation: 31

Invalid Hostname error in scrapy

I'm a novice in scrapy and I have trouble. When scrapy make request downloading from:

http://cache.pack.google.com/edgedl/earth/client/GE7/release_7_1_2/GoogleEarth-Win-Bundle-7.1.2.2041.1.exe

I get an error:

twisted.python.failure.Failure exceptions.ValueError: invalid hostname: r2---sn-ug5onuxaxjvh-n8vs.c.pack.google.com

How to solve this problem?

Upvotes: 3

Views: 3770

Answers (2)

Pritam Shrestha
Pritam Shrestha

Reputation: 486

On Windows you must use double inverted quotes ("url-path") instead of single inverted quote('url-path').

https://doc.scrapy.org/en/latest/intro/tutorial.html#extracting-data

Upvotes: 4

Ajay Unagar
Ajay Unagar

Reputation: 101

You need to put http address in inverted comma. As mentioned here for linux you can put address in single inverted commas '', but for windows users "" might work.

Upvotes: 10

Related Questions