http://172.16.28.110/mantis/view.php?id=49
http://172.16.28.110/mantis/view.php?id=42
http://172.16.28.110/mantis/view.php?id=14
原帖由 smallstar001 于 2008-12-26 15:16 发表
我有类似
很多,
我想下载它们的文本内容然后找我感兴趣的东西
我用
wget http://172.16.28.110/mantis/view.php?id=49
下载的怎么没有文本内容。该如何解决?
原帖由 smallstar001 于 2008-12-26 15:16 发表
我有类似
很多,
我想下载它们的文本内容然后找我感兴趣的东西
我用
wget http://172.16.28.110/mantis/view.php?id=49
下载的怎么没有文本内容。该如何解决?
原帖由 haimming 于 2008-12-26 15:24 发表
我有两个脚本,看看对你有没帮助
第一个知道最后一页页数
#! /bin/bash
#done book from url
url="http://www.linuxsir.org/bbs/thread29701.html"
urlbase=${url%/*}
urlfile=${url##*/}
wget ...
[root@CCOSS_484883689 mantis]# curl http://172.16.28.110/mantis/view.php?id=49 > a
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
[root@CCOSS_484883689 mantis]# cat a
[root@CCOSS_484883689 mantis]#
原帖由 ynchnluiti 于 2008-12-26 15:53 发表
是不是需要登录的问题?
如果是javascript, 搜搜document.write之类的。 看看文本是不是在参数里面。document.write("...")
# Log in to the server. This can be done only once.
wget --save-cookies cookies.txt \
--post-data 'user=foo&password=bar' \
http://server.com/auth.php
# Now grab the page or pages we care about.
wget --load-cookies cookies.txt \
-p http://server.com/interesting/article
原帖由 我是DBA 于 2008-12-26 16:30 发表
curl -d "username=用户名&password=密码&button=登录" http://172.16.28.110/mantis/login_page.php
用这个试试:)
wget -d -o log --keep-session-cookies cookie.txt --post-data "username=用户名&password=密码&loginsubmit='true'" 'http://bbs.chinaunix.net/logging.php?action=login&'
wget --load-cookies cookie.txt -p http://bbs.chinaunix.net/index.php -o log.2
原帖由 smallstar001 于 2008-12-29 15:32 发表
测试了下,还是不行 ,好象没有 --keep-session-cookie这个选项
我的需求是要先登陆login页面,然后去下载其它页面,
而且那个登陆按钮也没有name,看我发的那个登陆页面代码
原帖由 ynchnluiti 于 2008-12-29 15:38 发表
我没试用button=xx代替可不可以,不过只发username=xxx&password=xxx,cu登录不成功。
--keep-session-cookies
我用的是GNU Wget 1.11.4。
原帖由 smallstar001 于 2008-12-29 15:46 发表
get --version
GNU Wget 1.9+cvs-stable (Red Hat modified)
版权所有 (C) 2003 Free Software Foundation, Inc.
好老的版本
只能用--save-cookies
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |