我正在寻找一个python脚本,它可以在整个网页中搜索一个**(特定单词)**。所以在我环顾youtube后,我发现youtube上的人说“Scrapy比bs 4更好”。
所以我尝试使用Visual Studio / Pycharm,但出现以下错误:
File D:\ScrapyProject\Scripts\activate.ps1 cannot be loaded. The file D:\ScrapyProject\Scripts\activate.ps1 is not digitally signed. You cannot run this script on
the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : SecurityError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess
scrapy : The term 'scrapy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
+ scrapy
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (scrapy:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
都说动力壳必须更新(我已经更新到最新版本7.2.5)
set-executionpolicy unrestricted
有些人说我最喜欢
set-executionpolicy allow all
却不能解决问题
那么,有人能帮助解决这个错误吗?
还有,scrapy能帮我在整个网页中找到特定的短语吗?
1条答案
按热度按时间irlmq6kh1#
在管理shell中执行下面的命令,该命令会将所有可能的策略设置为不受限制。
此命令将在MachinePolicy、UserPolicy上失败,这通常通过GPO/注册表设置。
注册表项可以在HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell或gpedit.msc中找到
计算机配置〉管理模板〉Windows组件〉Windows PowerShell