gpt4 book ai didi

python - TOR with python stem (basic) - 'tor' 不在 PATH 中

转载 作者:太空狗 更新时间:2023-10-30 01:08:09 24 4
gpt4 key购买 nike

我正在尝试将 .onion 网站的内容导入 python,一些研究表明 'stem '当我运行这个 tutorial script ,或更具体地说,当我尝试使用 stem.process.launch_tor_with_config 时,出现此错误:

'tor' isn't available on your system. Maybe it's not in your PATH?

我应该安装某种 tor 进程,我得到了 tor 浏览器包并将/Tor 库(带有 tor.exe)放在我的路径中,但它没有帮助......显然我遗漏了一些非常基本的东西,请指教....

非常感谢...

最佳答案

我在我的 Mac 上遇到了同样的问题。尝试在 tor_cmd 参数中指定 tor 文件的确切位置:

tor_process = stem.process.launch_tor_with_config(
tor_cmd = '/Applications/TorBrowser.app/Tor/tor.real',
config = { SocksPort': str(SOCKS_PORT),
'ExitNodes': '{ru}',},
init_msg_handler = print_bootstrap_lines,
)

关于python - TOR with python stem (basic) - 'tor' 不在 PATH 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24801924/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com