File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,8 @@ async def _launch(self) -> None:
113113        """Launch Playwright manager and configured startup context(s).""" 
114114        logger .info ("Starting download handler" )
115115        self .playwright_context_manager  =  PlaywrightContextManager ()
116-         playwright_instance  =  await  self .playwright_context_manager .start ()
117-         self .browser_type : BrowserType  =  getattr (playwright_instance , self .browser_type_name )
116+         self . playwright  =  await  self .playwright_context_manager .start ()
117+         self .browser_type : BrowserType  =  getattr (self . playwright , self .browser_type_name )
118118        if  self .startup_context_kwargs :
119119            logger .info ("Launching %i startup context(s)" , len (self .startup_context_kwargs ))
120120            await  asyncio .gather (
@@ -266,6 +266,7 @@ async def _close(self) -> None:
266266            logger .info ("Closing browser" )
267267            await  self .browser .close ()
268268        await  self .playwright_context_manager .__aexit__ ()
269+         await  self .playwright .stop ()
269270
270271    def  download_request (self , request : Request , spider : Spider ) ->  Deferred :
271272        if  request .meta .get ("playwright" ):
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments