File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -163,8 +163,8 @@ class AwesomeSpiderWithPage(scrapy.Spider):
163163 async def parse (self , response ):
164164 page = response.meta[" playwright_page" ]
165165 title = await page.title() # "Example Domain"
166- yield {" title" : title}
167166 await page.close()
167+ return {" title" : title}
168168```
169169
170170** Notes:**
@@ -226,8 +226,8 @@ class ScrollSpider(scrapy.Spider):
226226 async def parse (self , response ):
227227 page = response.meta[" playwright_page" ]
228228 await page.screenshot(path = " quotes.png" , fullPage = True )
229- yield {" quote_count" : len (response.css(" div.quote" ))} # quotes from several pages
230229 await page.close()
230+ return {" quote_count" : len (response.css(" div.quote" ))} # quotes from several pages
231231```
232232
233233
You can’t perform that action at this time.
0 commit comments