执行uc.Chrome()报错

来源:4-8 . cnblogs模拟登录(新增内容)

兰陵小生

2022-02-05

执行到uc.Chrome()报错

github上面已经取消了undetected_chromedriver.v2的引用,请直接使用如下代码:

import undetected_chromedriver as uc
driver = uc.Chrome()
driver.get('https://nowsecure.nl')

图片描述

写回答

2回答

Jynine

2022-02-10

我改成你这个代码还是报错:

Traceback (most recent call last):

  File "F:\python\envs\article_spider\lib\site-packages\scrapy\core\engine.py", line 129, in _next_request

    request = next(slot.start_requests)

  File "F:\python\pythonworkspace\ArticleSpider\ArticleSpider\spiders\cnblogs.py", line 13, in start_requests

    driver = uc.Chrome()

  File "F:\python\envs\article_spider\lib\site-packages\undetected_chromedriver\__init__.py", line 357, in __init__

    options.binary_location, *options.arguments

  File "F:\python\envs\article_spider\lib\site-packages\undetected_chromedriver\dprocess.py", line 34, in start_detached

    daemon=True,

  File "c:\program files\python\lib\multiprocessing\process.py", line 112, in start

    self._popen = self._Popen(self)

  File "c:\program files\python\lib\multiprocessing\context.py", line 223, in _Popen

    return _default_context.get_context().Process._Popen(process_obj)

  File "c:\program files\python\lib\multiprocessing\context.py", line 322, in _Popen

    return Popen(process_obj)

  File "c:\program files\python\lib\multiprocessing\popen_spawn_win32.py", line 46, in __init__

    prep_data = spawn.get_preparation_data(process_obj._name)

  File "c:\program files\python\lib\multiprocessing\spawn.py", line 143, in get_preparation_data

    _check_not_importing_main()

  File "c:\program files\python\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main

    is not going to be frozen to produce an executable.''')


0
1
bobby
你留下qq 我加你看看吧
2022-02-13
共1条回复

bobby

2022-02-06

你的报错信息是什么呢?

0
0

Scrapy打造搜索引擎 畅销4年的Python分布式爬虫课

带你彻底掌握Scrapy,用Django+Elasticsearch搭建搜索引擎

5795 学习 · 6290 问题

查看课程