spider.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:OS_FrontendMaster-dl 作者: li-xinyang 项目源码 文件源码
def __init__(self, mute_audio):
        options = webdriver.ChromeOptions()

        # FM detects useragent and says 403 as return
        # so we just define valid useragent
        options.add_argument("--user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36'")
        options.add_argument("--headless")
        options.add_argument("--disable-gpu")
        options.add_argument("--window-size=1920x1080")

        if mute_audio:
            options.add_argument("--mute-audio")

        self.browser = webdriver.Chrome(chrome_options=options)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号