浏览代码

修改user-agent

xyxie 1 年之前
父节点
当前提交
ff4c3ebe59
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      metting.py

+ 1 - 2
metting.py

@@ -86,8 +86,7 @@ if __name__ == "__main__":
     options.add_argument('--headless')
     options.add_argument('--disable-gpu')
     options.add_argument('--no-sandbox')
-    options.add_argument('--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, '
-                         'like Gecko) Chrome/118.0.5993.70 Safari/537.36')
+    options.add_argument('--user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5993.70 Safari/537.36')
     options.add_argument(" window-size=1920,1080")
     # options.add_argument(" window-size=1920,1080")
     s = Service(executable_path='/home/code/python/meeting_probabilities/chromedriver')