CURL或WGET登录,重定向然后提交

时间:2015-10-09 13:31:37

标签: linux curl wget

首先,linux至今不是我的事,但我可以理解基础知识。 我需要做的是登录一个网站,它会将我重定向到另一个页面,此时我需要提交该页面。该网站确实使用会话Cookie,因此我需要跟踪这些内容以执行我需要的所有操作。

在审核了一些网站后,这是我能够提出的,但它似乎没有捕获会话cookie,如果没有别的 整个要点是设置一个cron作业,每周为我运行一个报告,而不是我必须登录到站点并手动执行任务

curl -d "username=MYUSERNAME&password=MYPASSWORD&submit=Llocation --dump-header headers_and_cookies http://example.com?event=loginProcess http://example.com/?event=loginProcess http://example.com/?event=thepromiseland

这是我已经拥有的wget似乎不起作用。

wget --save-cookies cookies.txt --keep-session-cookies --post-data="username=MyUserName&password=MyPassword"  --no-cache --spider "http://example.com/?event=thepromiseland"

0 个答案:

没有答案
相关问题