依赖关系
依赖的软件包:wget,curl
wget -Of "http://wappass.baidu.com/passport/?login&u=http%3A%2F%2Fwapp.baidu.com%2F" --save-cookies=t0
sed -n '/login_start_time/w l' f
sed -n '/uid/w u' f
sed -n '/value/w v' u
lst=$(awk -F'["]+' '{print $6}' l)
awk -F'["]+' '{print $6}' v>w
uid=$(sed -n '1p' w)
#在此处填写用户名和密码(简单地替换即可)
curl --cookie t0 --cookie-jar t1 -d "login_username=用户名&login_loginpass=密码&u=http://wapp.baidu.com/f/m?tn=bdFBW&tab=favorite&login_start_time=${lst}&uid=${uid}" "http://wappass.baidu.com/passport/?login" >d
sed -n '/refresh/w e' d
awk -F 'url=' '{print $2}' e>n
awk -F'["]+' '{print $1}' n>o
url=$(sed 's/\&/\&/g' o)
wget -Oc "${url}" --load-cookies=t1
sed "s/>/\n/g" c>i
sed -n '/a href="\/f/w j' i
awk -F 'kw=' '{print $2}' i>m
awk -F'["]+' '{print $1}' m>p
sed '/^$/d' p>q
cat q |while read line
do
wget -Or --load-cookie t1 "http://wapp.baidu.com/m?kw=${line}"
sed "s/>/\n/g" r>s
sed -n '/float:right;/w j' s
awk -F'["]+' '{print $4}' j>z
url2=http://wapp.baidu.com$(sed 's/\&/\&/g' z)
wget --load-cookies=t1 -Ok "${url2}"
sed "s/</\n</g" k>m
sed -n '/="light/w g' m
sed -n '2p' g>h
awk -F '<span class="light">' '{print $2}' h>b
cat b
done
依赖的软件包:wget,curl
wget -Of "http://wappass.baidu.com/passport/?login&u=http%3A%2F%2Fwapp.baidu.com%2F" --save-cookies=t0
sed -n '/login_start_time/w l' f
sed -n '/uid/w u' f
sed -n '/value/w v' u
lst=$(awk -F'["]+' '{print $6}' l)
awk -F'["]+' '{print $6}' v>w
uid=$(sed -n '1p' w)
#在此处填写用户名和密码(简单地替换即可)
curl --cookie t0 --cookie-jar t1 -d "login_username=用户名&login_loginpass=密码&u=http://wapp.baidu.com/f/m?tn=bdFBW&tab=favorite&login_start_time=${lst}&uid=${uid}" "http://wappass.baidu.com/passport/?login" >d
sed -n '/refresh/w e' d
awk -F 'url=' '{print $2}' e>n
awk -F'["]+' '{print $1}' n>o
url=$(sed 's/\&/\&/g' o)
wget -Oc "${url}" --load-cookies=t1
sed "s/>/\n/g" c>i
sed -n '/a href="\/f/w j' i
awk -F 'kw=' '{print $2}' i>m
awk -F'["]+' '{print $1}' m>p
sed '/^$/d' p>q
cat q |while read line
do
wget -Or --load-cookie t1 "http://wapp.baidu.com/m?kw=${line}"
sed "s/>/\n/g" r>s
sed -n '/float:right;/w j' s
awk -F'["]+' '{print $4}' j>z
url2=http://wapp.baidu.com$(sed 's/\&/\&/g' z)
wget --load-cookies=t1 -Ok "${url2}"
sed "s/</\n</g" k>m
sed -n '/="light/w g' m
sed -n '2p' g>h
awk -F '<span class="light">' '{print $2}' h>b
cat b
done