PS C:\Users\chenxianqiang> & D:/python3/python.exe d:/pythonbaijiahao/baijiahao.py d:\pythonbaijiahao\baijiahao.py:22: DeprecationWarning: executable_path has been deprecated, please pass in a Service object driver = webdriver.Chrome(r"D:\python3\Scripts\chromedriver.exe")
时间: 2023-09-05 19:15:16 浏览: 62
这段代码中同样出现了一个 DeprecationWarning,警告您使用的是已过时的方法。建议您改用新的方法来替代,例如:
```python
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
```
这里使用 webdriver_manager 来安装和管理 ChromeDriver,避免了手动下载和指定 chromedriver 路径的麻烦。
相关问题
网站https://baijiahao.baidu.com/s?id=1761218736314126215 改成GB参考文献格式
好的,这是将该网站的参考文献转换为 GB 格式的示例:
百度百家号. (2019, 5月 21日). 人工智能在智慧城市建设中的应用与发展 [Blog post]. 2020年6月25日, 自 https://www.baidu.com/s?wd=%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD%E5%9C%A8%E6%99%BA%E6%85%A7%E5%9F%8E%E5%B8%82%E5%BB%BA%E8%AE%BE%E4%B8%AD%E7%9A%84%E5%BA%94%E7%94%A8%E4%B8%8E%E5%8F%91%E5%B1%95&rss=re-u0026ch=1
参考文献中的日期格式使用阿拉伯数字,月份缩写前不加点,网站链接后面添加的“&rss=re-u0026ch=1”是百度搜索结果页面中的参数,可以去除。
人民网 大数据大算力推动人工智能走向大模型时代 https://baijiahao.baidu.com/s?id=1761218736314126215 改成GB参考文献格式
好的,这是将该新闻的参考文献转换为 GB 格式的示例:
人民网. (2019, 8月 15日). 大数据大算力推动人工智能走向大模型时代 [News article]. 2020年6月25日, 自 http://finance.people.com.cn/n1/2019/0815/c1004-31361972.html
参考文献中的日期格式使用阿拉伯数字,月份缩写前不加点,网站链接后面不需要添加任何参数。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
Traceback (most recent call last): File "d:\pythonbaijiahao\baijiahao.py", line 82, in mianrun sub_element.click() File "D:\python3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 81, in click self._execute(Command.CLICK_ELEMENT) File "D:\python3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 710, in _execute return self._parent.execute(command, params) File "D:\python3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 425, in execute self.error_handler.check_response(response) File "D:\python3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element 管理商品 is not clickable at point (930, 347). Other element would receive the click: <svg viewBox="64 64 896 896" focusable="false" data-icon="vertical-align-top" width="1em" height="1em" fill="currentColor" aria-hidden="true">...</svg> (Session info: MicrosoftEdge=113.0.1774.42) Stacktrace:
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)