WGET,防止会话注销

  • 本文关键字:会话 注销 WGET wget
  • 更新时间 :
  • 英文 :


我正在尝试抓取一个需要使用wget登录的网站,但每次找到注销网址(https://example.com/logout/(时都会停止。 我尝试排除目录但没有成功。 这是我的命令:

wget --content-disposition --header "Cookie: session_cookies" -k -m -r -E -p --level=inf --retry-connrefused -D site.com -X */logout/*,*/settings/* -o log.txt https://example.com/

我尝试过使用 -R 选项而不是 -X,但这不起作用。

可以通过关键字 "--reject-regex" 来解决,像这样:"--reject-regex logout",参见:wget-devTips

最新更新