一个简单的爬行包bol.com网站
bol-crawler的Python项目详细描述
bolcom_爬行器
这是一个非常简单的爬虫程序,它使用Scrapy来抓取bol.com。在
使用
Crawler
实例有两个函数可以使用,crawl_products
和{
from bol_crawler.crawler import Crawler
crawler = Crawler()
# to crawl products
products = crawler.crawl_products(
[
'https://www.bol.com/nl/p/lg-34gl750-b-ultragear-gaming-monitor/9200000115819731',
]
)
# to crawl a category
products = crawler.crawl_category(
[
'https://www.bol.com/nl/l/gaming-toetsenborden/N/18214/', 0 # the 0 value is how often you want to go to the next page. 0 is just crawling the first page
]
)
- 项目
标签: