wuwenyi пре 1 година
родитељ
комит
213921afe7
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      xhs/__init__.py

+ 4 - 4
xhs/__init__.py

@@ -52,10 +52,10 @@ class XhsBrowser(BaseBrowser):
         return xhs_client_obj
 
     def login(self):
-        with sync_playwright() as playwright:
-            self.__init_browser__()
-            # 暂时采用手动登录
-            self.page.wait_for_timeout(60_000)
+        self.__init_browser__()
+        # 暂时采用手动登录
+        self.page.wait_for_timeout(60_000)
+        self.playwright.stop()
 
     def polish_huitun_note(self, huitun_notes: []):
         """