我目前正在抓取this website来构建一个汽车数据集,并且我有一个公式,可以在抓取的同时循环遍历网站的每个页面。然而,我无法提取我需要的文本,使其工作。 下面的代码片段是我试图抓取的标记。我需要得到网站上的车辆数量。 <span class="d-none d-sm-inline">166 Vehicles</span> This image shows the site's element that I am trying to scrape 下面是我用来抓取该元素的代码: # Packages
当我在编辑器中执行代码时,一切都正常,但是当我从CMD执行脚本时,我会得到一个错误,指示没有一个名为requests_html的模块。File "C:\Users\EM\PycharmProjects\Learn\Automate the Boring Stuff\lucky.py", line 6, in <module>ModuleNotFoundError: No module named 'requests_htm
但是,当我尝试使用pyinstaller (3.6版)构建不带--windowed的可执行文件时,从cmd运行可执行文件会得到一个ImportError: No module named lz4。所以我猜是因为某些原因pyinstaller不能包含特定的包。hiddenimports=['lz4'],,并在.spec文件而不是.py文件(以及.py文件)上运行pyinstaller命令,包括
h