Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Oszkár Fehér
Python Web Development Techdegree Graduate 32,887 PointsI got no data
I followed as the video
import scrapy
class HorseSpider(scrapy.Spider):
name = 'ike'
def start_requests(self):
urls = ['https://treehouse-projects.github.io/horse-land/index.html',
'https://treehouse-projects.github.io/horse-land/mustang.html'
]
return [scrapy.Request(url=url, callback=self.parse) for url in urls]
def parse(self, response):
url = response.url
page = url.split('/')[-1]
filename = 'horses-%s' % page
print('URL is: {}'.format(url))
with open(filename, 'wb') as file:
file.write(response.body)
print('Saved file %s' % filename)
and i got this error:
ModuleNotFoundError: No module named 'win32api'
Can someone help me out with this please.
1 Answer
Alexander Davison
65,470 PointsTry installing it with
pip install pypiwin32
Or
pip3 install pypiwin32
Oszkár Fehér
Python Web Development Techdegree Graduate 32,887 PointsOszkár Fehér
Python Web Development Techdegree Graduate 32,887 PointsIt worked. Thanks a lot Alexander. I just wonder why this is not mentioned in the teachers notes?!
Alexander Davison
65,470 PointsAlexander Davison
65,470 PointsNot sure :/