|
6#
楼主 |
发表于 2009-5-5 10:02:28
|
只看该作者
回复 6# 的帖子
朋友 你说的是不是这个意思 我这么配置对吗
#include "web_api.h"
Action()
{
lr_start_transaction("第一个事物");
web_reg_find("Text=hao123网址之家--实用网址,搜索大全,尽在www.hao123.com",
LAST);
web_url("www.hao123.com",
"URL=http://www.hao123.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/line.gif", ENDITEM,
"Url=/images/dropdown.gif", ENDITEM,
"Url=/images/guangg/it168.gif", ENDITEM,
LAST);
web_add_cookie("BAIDUID=5E07E5D447808C89A503A6DAF7048096:FG=1; DOMAIN=www.baidu.com");
web_add_cookie("BDLFONT=0; DOMAIN=www.baidu.com");
web_add_cookie("MAPCITY=010,; DOMAIN=www.baidu.com");
web_add_cookie("BD_UTK_DVT=1; DOMAIN=www.baidu.com");
lr_think_time( 1 );
lr_end_transaction("第一个事物", LR_AUTO);
lr_start_transaction("第二个事物");
web_reg_find("Text=百度一下,你就知道 ",
LAST);
web_image("百度首页",
"Alt=百度首页",
"Snapshot=t2.inf",
EXTRARES,
"Url=/js/bdsug.js?v=1.1.0.1", "Referer=http://www.baidu.com/index.php?tn=sitehao123", ENDITEM,
LAST);
lr_think_time( 4 );
lr_end_transaction("第二个事物", LR_AUTO);
lr_start_transaction("第三个事物");
web_reg_find("Text=高级搜索 ",
LAST);
web_link("高级",
"Text=高级",
"Snapshot=t3.inf",
LAST);
lr_think_time( 21 );
lr_end_transaction("第三个事物", LR_AUTO);
lr_start_transaction("第四个事物");
web_reg_find("Text=百度搜索_中国 "中国" (中国) -(天下) ",
LAST);
web_submit_form("s",
"Snapshot=t4.inf",
ITEMDATA,
"Name=q1", "Value=中国", ENDITEM,
"Name=q2", "Value=中国", ENDITEM,
"Name=q3", "Value=中国", ENDITEM,
"Name=q4", "Value=天下", ENDITEM,
"Name=rn", "Value=每页显示10条", ENDITEM,
"Name=lm", "Value=全部时间", ENDITEM,
"Name=ct", "Value=0", ENDITEM,
"Name=ft", "Value=所有网页和文件", ENDITEM,
"Name=q5", "Value=", ENDITEM,
"Name=q6", "Value=", ENDITEM,
LAST);
web_add_cookie("BAIDUID=5E07E5D447808C89A503A6DAF7048096:FG=1; DOMAIN=baike.baidu.com");
web_add_cookie("BDLFONT=0; DOMAIN=baike.baidu.com");
web_add_cookie("MAPCITY=010,; DOMAIN=baike.baidu.com");
web_add_cookie("BD_UTK_DVT=1; DOMAIN=baike.baidu.com");
lr_think_time( 3 );
lr_end_transaction("第四个事物", LR_AUTO);
lr_start_transaction("第五个事物");
web_reg_find("Text=中国_百度百科 ",
LAST);
web_add_cookie("BAIDUID=5E07E5D447808C89A503A6DAF7048096:FG=1; DOMAIN=img.baidu.com");
web_add_cookie("BDLFONT=0; DOMAIN=img.baidu.com");
web_add_cookie("MAPCITY=010,; DOMAIN=img.baidu.com");
web_add_cookie("BD_UTK_DVT=1; DOMAIN=img.baidu.com");
web_link("中国_百度百科",
"Text=中国_百度百科",
"Snapshot=t5.inf",
EXTRARES,
"Url=http://img.baidu.com/img/baike/bgs3.gif", ENDITEM,
"Url=http://img.baidu.com/img/baike/word_arr.gif", ENDITEM,
LAST);
web_url("lemmaid=61891&random=0.19578247740328253",
"URL=http://baike.baidu.com/view/getLemmaCountAsc/lemmaid=61891&random=0.19578247740328253",
"Resource=0",
"RecContentType=text/html",
"Referer=http://baike.baidu.com/view/61891.htm",
"Snapshot=t6.inf",
"Mode=HTML",
LAST);
lr_end_transaction("第五个事物", LR_AUTO);
return 0; |
|