阅读(4649) (0)

scrapy 2.3 使用项目对象

2021-06-04 13:57:52 更新

下面是一些使用项执行的常见任务的示例,使用 Product 项目 declared above . 您会注意到API与 dict 应用程序编程接口。

创建项目

>>> product = Product(name='Desktop PC', price=1000)
>>> print(product)
Product(name='Desktop PC', price=1000)