czy1999/weibo-topic-spider

小白求指导如何运行起来爬取普通话题

Silvia-xiu opened this issue · 1 comments

新手接触爬虫,老师给的任务是爬取微博话题##的内容,已经安装了Chromedriver,尝试使用pycharm运行时,有很多报错,是我环境设置等的原因吗?好懵逼,哭哭
C:\ProgramData\Anaconda3\python.exe C:/Users/Administrator.DESKTOP-IKQ3NBP/Desktop/weibo-topic-spider-master/normal-topic-spyder.py
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
PermissionError: [WinError 5] 拒绝访问。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/Administrator.DESKTOP-IKQ3NBP/Desktop/weibo-topic-spider-master/normal-topic-spyder.py", line 187, in
driver = webdriver.Chrome('C:\Program Files (x86)\Google\Chrome\Application')#你的chromedriver的地址
File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
self.service.start()
File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\common\service.py", line 86, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'Application' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

Process finished with exit code 1

权限问题,检查一下自己的环境配置