# web_CNKI **Repository Path**: jemi-L/web_-cnki ## Basic Information - **Project Name**: web_CNKI - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-03 - **Last Updated**: 2021-07-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## web_CNKI ### 代码前期 * 使用Selenium指定路径下载文件 ```python from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities opts = webdriver.ChromeOptions() opts.add_argument('--no-sandbox')#解决DevToolsActivePort文件不存在的报错 opts.add_argument('window-size=1920x3000') #指定浏览器分辨率 opts.add_argument('--disable-gpu') #谷歌文档提到需要加上一这个属性来规避bug opts.add_argument('--hide-scrollbars') #隐藏滚动条, 应对些特殊页面 out_path = r'C:\Users\10144\Desktop\CNKI_text' # 是你想指定的路径 prefs = {'profile.default_content_settings.popups': 0, 'download.default_directory': out_path} opts.add_experimental_option('prefs', prefs) driver = webdriver.Chrome( chrome_options = opts) #desired_capabilities=caps, ``` 代码具体如下:[web_知网](https://gitee.com/jemi-L/web_-cnki/blob/master/web_week13_%E7%9F%A5%E7%BD%91.ipynb) * 数据说明: 1.本次检索关键词为新媒体与网络等系列文献,分析新媒体对当今时代的影响等。 2.检索文章共550篇,共11页,每页50篇,并导出150篇reworks进行可视化图: ![可视化](可视化图.png) ### 心得 * 在完成作业中遇到很多困难,包括验证码以及PDF导出等一系列问题,感谢百度中一些网友的帖子和经验,以及一些同学的帮助,让我完成这次作业。 * 代码运行过程中在网络不好的情况下容易报错,也是一个很考验耐心的问题。 * 参考链接: [验证码问题参考](https://blog.csdn.net/qq_31152023/article/details/100066460) [验证码爬取+识别](https://zhuanlan.zhihu.com/p/38057424) ### 感谢 * 讯飞API的免费使用,以识别验证码[讯飞API](https://www.xfyun.cn/service/textRecg) * Selenium文档说明的使用[Selenium文档](https://www.selenium.dev/documentation/zh-cn/getting_started/) * VOSviewer介绍[VOSviewer分析CNKI数据](https://zhuanlan.zhihu.com/p/30970993)