Scrapy start
This commit is contained in:
1 parent
568462cb0a
commit
b194d24901
3 files changed
+372
No files matched your search
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Was ist zu tun?
|
||||
Erstellen Sie mittels Scrapy einen Web Crawler für die in Ü11 Website beschriebenen Website.
|
||||
Lassen Sie Ihr Programm laufen und geben Sie die Daten in output.json aus.
|
||||
Laden Sie das Python-Programm als auch output.json in diese Aufgabe hoch.
|
||||
"""
|
||||
|
||||
import scrapy
|
||||
|
||||
class MySpider(scrapy.Spider):
|
||||
url = "https://books.toscrape.com/"
|
||||
output_file = "output.json"
|
||||
|
||||
def start_requests(self):
|
||||
yield scrapy.Request(url=self.url, callback=self.parse)
|
||||
|
||||
def parse(self, response):
|
||||
pass
|
||||
Reference in new issue
Block a user