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

请教下 自定义配置 中如何使用 WEBDRIVER #42

Closed
FlowerOda opened this issue Mar 21, 2021 · 1 comment
Closed

请教下 自定义配置 中如何使用 WEBDRIVER #42

FlowerOda opened this issue Mar 21, 2021 · 1 comment

Comments

@FlowerOda
Copy link
Contributor

FlowerOda commented Mar 21, 2021

这样使用不生效
`class SpiderTest(feapder.AirSpider):

__custom_setting__ =dict(
    WEBDRIVER=dict(
        pool_size=2,  # 浏览器的数量
        load_images=False,  # 是否加载图片
        user_agent=None,  # 字符串 或 无参函数,返回值为user_agent
        proxy=None,  # xxx.xxx.xxx.xxx:xxxx 或 无参函数,返回值为代理地址
        headless=False,  # 是否为无头浏览器
        driver_type="CHROME",  # CHROME 或 PHANTOMJS,
        timeout=30,  # 请求超时时间
        window_size=(1024, 800),  # 窗口大小
        executable_path=None,  # 浏览器路径,默认为默认路径
    )
)`
@FlowerOda
Copy link
Contributor Author

我的错误

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

1 participant