本文整理匯總了Python中scrapy.http.request.Request.meta["statement"]方法的典型用法代碼示例。如果您正苦於以下問題:Python Request.meta["statement"]方法的具體用法?Python Request.meta["statement"]怎麽用?Python Request.meta["statement"]使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類scrapy.http.request.Request
的用法示例。
在下文中一共展示了Request.meta["statement"]方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: parseStatements
# 需要導入模塊: from scrapy.http.request import Request [as 別名]
# 或者: from scrapy.http.request.Request import meta["statement"] [as 別名]
def parseStatements(self, response):
"""Third step of Mon/rg parsing (Category)."""
node = response.meta["node"]
dom = response.meta["domain"]
self.statements = json.loads(response.body_as_unicode())
for statement in self.statements:
link_state = self.domain + self.statements[statement]
request = Request(link_state, callback=self.parseNativeObjects)
# Pass metadata to the next wave of parsing
request.meta["node"] = node
request.meta["domain"] = dom
request.meta["statement"] = statement
yield request
return