Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playwright 1.31.1的版本,开配置开启use_stealth_js=True时,会报错 #199

Open
demo1024 opened this issue Mar 3, 2023 · 2 comments

Comments

@demo1024
Copy link

demo1024 commented Mar 3, 2023

问题
feapder版本1.8.5,playright 1.31.1
使用playright渲染时,开配置开启use_stealth_js=True时,会报错,内容为:"RuntimeError: cannot schedule new futures after interpreter shutdown"

代码

import time

from playwright.sync_api import Page

import feapder
from feapder.utils.webdriver import PlaywrightDriver


class TestPlaywright(feapder.AirSpider):
    __custom_setting__ = dict(
        RENDER_DOWNLOADER="feapder.network.downloader.PlaywrightDownloader",
    )

    def start_requests(self):
        yield feapder.Request("https://www.baidu.com", render=True)

    def parse(self, reqeust, response):
        driver: PlaywrightDriver = response.driver
        page: Page = driver.page

        print(response)


if __name__ == "__main__":
    TestPlaywright(thread_count=1).run()
@demo1024
Copy link
Author

demo1024 commented Mar 3, 2023

切换playwright版本为1.30.0可以解决

@demo1024 demo1024 changed the title playright 1.31.1的版本,开配置开启use_stealth_js=True时,会报错 playwright 1.31.1的版本,开配置开启use_stealth_js=True时,会报错 Mar 3, 2023
@hijack911
Copy link
Contributor

切换playwright版本为1.30.0可以解决

切换后还是不行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants