Last active
October 17, 2019 20:23
-
-
Save doroudi/e0eb9809d48986183692bc7c855cdf49 to your computer and use it in GitHub Desktop.
Get movies title from imdb.com top movies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import scrapy | |
class TopmoviesSpider(scrapy.Spider): | |
name = 'topMovies' | |
allowed_domains = ['imdb.com'] | |
start_urls = ['https://www.imdb.com/chart/top/'] | |
def parse(self, response): | |
titles = response.css(".lister-list .titleColumn a::text").extract() | |
for title in titles: | |
print(title) | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment