Scrapy 1.6 Documentationformat (XML or CSV, for example) or the storage backend (FTP or Amazon S3, for example). You can also write an item pipeline to store the items in a database. 6 Chapter 2. First steps Scrapy Documentation Documentation, Release 1.6.0 (continued from previous page) with open(filename, 'wb') as f: f.write(response.body) self.log('Saved file %s' % filename) As you can see, our Spider subclasses scrapy.Spider and Spiders. • start_requests(): must return an iterable of Requests (you can return a list of requests or write a generator function) which the Spider will begin to crawl from. Subsequent requests will be generated0 码力 | 295 页 | 1.18 MB | 1 年前3
Scrapy 1.4 Documentationhow it can help you. Installation guide Get Scrapy installed on your computer. Scrapy Tutorial Write your first Scrapy project. Examples Learn more by playing with a pre-made Scrapy project. Basic Command line tool Learn about the command-line tool used to manage your Scrapy project. Spiders Write the rules to crawl your websites. Selectors Extract the data from web pages using XPath. Scrapy or the storage backend (FTP or Amazon S3 [https://aws.amazon.com/s3/], for example). You can also write an item pipeline to store the items in a database. What else? You’ve seen how to extract and store0 码力 | 394 页 | 589.10 KB | 1 年前3
Scrapy 1.8 Documentationformat (XML or CSV, for example) or the storage backend (FTP or Amazon S3, for example). You can also write an item pipeline to store the items in a database. 6 Chapter 2. First steps Scrapy Documentation url.split("/")[-2] filename = 'quotes-%s.html' % page with open(filename, 'wb') as f: f.write(response.body) self.log('Saved file %s' % filename) As you can see, our Spider subclasses scrapy.Spider and Spiders. • start_requests(): must return an iterable of Requests (you can return a list of requests or write a generator function) which the Spider will begin to crawl from. Subsequent requests will be generated0 码力 | 335 页 | 1.44 MB | 1 年前3
Scrapy 1.7 Documentationformat (XML or CSV, for example) or the storage backend (FTP or Amazon S3, for example). You can also write an item pipeline to store the items in a database. 6 Chapter 2. First steps Scrapy Documentation Documentation, Release 1.7.4 (continued from previous page) with open(filename, 'wb') as f: f.write(response.body) self.log('Saved file %s' % filename) As you can see, our Spider subclasses scrapy.Spider and Spiders. • start_requests(): must return an iterable of Requests (you can return a list of requests or write a generator function) which the Spider will begin to crawl from. Subsequent requests will be generated0 码力 | 306 页 | 1.23 MB | 1 年前3
Scrapy 2.2 Documentationformat (XML or CSV, for example) or the storage backend (FTP or Amazon S3, for example). You can also write an item pipeline to store the items in a database. 6 Chapter 2. First steps Scrapy Documentation url.split("/")[-2] filename = 'quotes-%s.html' % page with open(filename, 'wb') as f: f.write(response.body) self.log('Saved file %s' % filename) As you can see, our Spider subclasses scrapy.Spider and Spiders. • start_requests(): must return an iterable of Requests (you can return a list of requests or write a generator function) which the Spider will begin to crawl from. Subsequent requests will be generated0 码力 | 348 页 | 1.35 MB | 1 年前3
Scrapy 2.4 Documentationformat (XML or CSV, for example) or the storage backend (FTP or Amazon S3, for example). You can also write an item pipeline to store the items in a database. 2.1.2 What else? You’ve seen how to extract and url.split("/")[-2] filename = f'quotes-{page}.html' with open(filename, 'wb') as f: f.write(response.body) self.log(f'Saved file {filename}') As you can see, our Spider subclasses scrapy.Spider and defines Spiders. • start_requests(): must return an iterable of Requests (you can return a list of requests or write a generator function) which the Spider will begin to crawl from. Subsequent requests will be generated0 码力 | 354 页 | 1.39 MB | 1 年前3
Scrapy 2.3 Documentationformat (XML or CSV, for example) or the storage backend (FTP or Amazon S3, for example). You can also write an item pipeline to store the items in a database. 6 Chapter 2. First steps Scrapy Documentation url.split("/")[-2] filename = 'quotes-%s.html' % page with open(filename, 'wb') as f: f.write(response.body) self.log('Saved file %s' % filename) As you can see, our Spider subclasses scrapy.Spider and Spiders. • start_requests(): must return an iterable of Requests (you can return a list of requests or write a generator function) which the Spider will begin to crawl from. Subsequent requests will be generated0 码力 | 352 页 | 1.36 MB | 1 年前3
Scrapy 2.1 Documentationformat (XML or CSV, for example) or the storage backend (FTP or Amazon S3, for example). You can also write an item pipeline to store the items in a database. 6 Chapter 2. First steps Scrapy Documentation url.split("/")[-2] filename = 'quotes-%s.html' % page with open(filename, 'wb') as f: f.write(response.body) self.log('Saved file %s' % filename) As you can see, our Spider subclasses scrapy.Spider and Spiders. • start_requests(): must return an iterable of Requests (you can return a list of requests or write a generator function) which the Spider will begin to crawl from. Subsequent requests will be generated0 码力 | 342 页 | 1.32 MB | 1 年前3
Scrapy 2.0 Documentationformat (XML or CSV, for example) or the storage backend (FTP or Amazon S3, for example). You can also write an item pipeline to store the items in a database. 6 Chapter 2. First steps Scrapy Documentation url.split("/")[-2] filename = 'quotes-%s.html' % page with open(filename, 'wb') as f: f.write(response.body) self.log('Saved file %s' % filename) As you can see, our Spider subclasses scrapy.Spider and Spiders. • start_requests(): must return an iterable of Requests (you can return a list of requests or write a generator function) which the Spider will begin to crawl from. Subsequent requests will be generated0 码力 | 336 页 | 1.31 MB | 1 年前3
Scrapy 1.7 Documentationhow it can help you. Installation guide Get Scrapy installed on your computer. Scrapy Tutorial Write your first Scrapy project. Examples Learn more by playing with a pre-made Scrapy project. Basic Command line tool Learn about the command-line tool used to manage your Scrapy project. Spiders Write the rules to crawl your websites. Selectors Extract the data from web pages using XPath. Scrapy or the storage backend (FTP or Amazon S3 [https://aws.amazon.com/s3/], for example). You can also write an item pipeline to store the items in a database. What else? You’ve seen how to extract and store0 码力 | 391 页 | 598.79 KB | 1 年前3
共 62 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7













