B2B网站发布脚本中国供应商_产品信息发布
本脚本由我编写于2016-10-23 10:50:52,适用于B2B行业网站“中国供应商”之“产品信息发布”,特别推荐,“中国供应商”权重高,发布出去的产品信息易于收录且有良好排名,推荐尝试发布!下文按键精灵源码:
特别提示:亲自行替换读取文件后“”内的内容,此为读取后台TXT文本所在文件夹的路径。;
/* 版权声明 1.本段代码由我编写,深山的鹿博客:www.noteet.com; 2.请将PC分辨率设置为1920x1080; 3.请关闭所有会弹窗的软件,如阿里旺旺、QQ,以防干扰脚本循环运行; 4.本脚本为:“中国供应商--发布信息”发布脚本,请使用搜狗浏览器“高速模式”; 5.中国供应商产品上限1000条,每天发布数量不限; 6.如发布内容相似度过高页面会出现降权提示,导致坐标点击错误,需整改坐标后使用。 */ Randomize //调用文件取文件名函数 Function FindAllFiles(FolderPath) Dim AllFiles,fso,Folder,f,files AllFiles = "" Set fso = CreateObject("Scripting.FileSystemObject") Set Folder = fso.getfolder(FolderPath) Set files = Folder.files For Each f In files AllFiles = AllFiles & f.name & "," Next Set fso = Nothing FindAllFiles = Split(AllFiles, ",") End Function //点选坐标进入信息发布页 MoveTo 441, 283 Delay 500 LeftClick 1 Delay 500 MoveTo 555, 286 Delay 500 LeftClick 1 Delay 500 MoveTo 944, 676 Delay 500 LeftClick 1 Delay 500 LeftClick 1 MoveTo 991, 759 LeftClick 1 Delay 500 LeftClick 1 Delay 2888 //页面上移[除错] KeyPress "PageUp", 1 Delay 500 KeyPress "Enter", 1 Delay 500 KeyPress "PageUp", 1 Delay 500 //发布标题 /* //页面点击下移 MoveTo 1910, 1009 Delay 500 LeftClick 1 Delay 500 */ MoveTo 614, 361 Delay 350 LeftClick 1 Delay 500 //输入标题 //点击进入产品名称输入 //写入前除错 KeyPress "A", 1 Delay 300 KeyPress "BackSpace", 1 Delay 300 //写入标题 //写入首端着关键词 Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_关键词\屋面.txt") MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) SayString "_" //写入随机地名 文件夹路径 ="F:\调用TXT\1.标题_地名" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If //调用随机文档内的随机行 Text = Plugin.File.ReadFileEx(TXT路径) MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) //写入中间词 文件夹路径 ="F:\调用TXT\1.标题_细节" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If //调用随机文档内的随机行 Text = Plugin.File.ReadFileEx(TXT路径) MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) //写入关键词 Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_关键词\屋面.txt") MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) //写入匹配语 Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_匹配语\屋面.txt") MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) Delay 300 //复制标题 KeyDown 17, 1 KeyPress 65, 1 KeyUp 17, 1 Delay 300 KeyDown 17, 1 KeyPress 67, 1 KeyUp 17, 1 Delay 300 //键入3次Tab,输入关键词 KeyPress "Tab", 1 Delay 300 KeyPress "Tab", 1 Delay 300 KeyPress "Tab", 1 Delay 300 SayString "无梁拱" Delay 300 KeyPress "Tab", 1 Delay 300 //写入关键词(2) Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_关键词\屋面.txt") MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) //写入关键词(3) Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_关键词\屋面.txt") MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) //选择材质 MoveTo 845, 698 Delay 500 LeftClick 1 Delay 500 MoveTo 696, 781 Delay 500 LeftClick 1 Delay 500 //选择使用范围 MoveTo 841, 741 Delay 500 LeftClick 1 Delay 500 MoveTo 708, 822 Delay 500 LeftClick 1 Delay 500 //选择产品类别 MoveTo 841, 787 Delay 500 LeftClick 1 Delay 500 MoveTo 700, 835 Delay 500 LeftClick 1 Delay 500 //选择产地 MoveTo 842, 826 Delay 500 LeftClick 1 Delay 500 MoveTo 737, 957 Delay 500 LeftClick 1 Delay 500 MoveTo 896, 825 Delay 500 LeftClick 1 Delay 500 //1.读取:地区 Text = Plugin.File.ReadFileEx("F:\调用TXT\1-1江西.txt") TracePrint Text Var = Split(Text, "|") Var1 = UBound(Var) TracePrint Var1 Randomize 行数 = Int((Var1 + 1) * Rnd) TracePrint Var(行数) Delay 300 SayString (Cstr(Var(行数))) Delay 500 //输入品牌 KeyPress "Tab", 1 Delay 300 //写入关键词 Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_关键词\屋面.txt") MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) //输入钢板厚度 KeyPress "Tab", 1 Delay 500 SayString "0.8~1.3" Delay 500 //输入规格 KeyPress "Tab", 1 Delay 500 //写入型号 文件夹路径 ="F:\调用TXT\1.标题_细节" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If //调用随机文档内的随机行 Text = Plugin.File.ReadFileEx(TXT路径) MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) Delay 388 //页面下移 MoveTo 1650, 593 Delay 350 LeftClick 1 Delay 500 KeyPress "PageDown", 1 Delay 500 //点选钢型号 MoveTo 844, 185 Delay 350 LeftClick 1 Delay 500 MoveTo 726, 285 Delay 350 LeftClick 1 Delay 500 //输入每平方米用钢量 MoveTo 679, 223 Delay 350 LeftClick 1 Delay 500 SayString "80克镀锌层" Delay 500 //选择活动类型 MoveTo 840, 263 Delay 500 LeftClick 1 Delay 500 MoveTo 714, 338 Delay 500 LeftClick 1 Delay 500 //选择特殊用途 MoveTo 843, 304 Delay 500 LeftClick 1 Delay 500 MoveTo 670, 406 Delay 500 LeftClick 1 Delay 500 //选择交易单位 MoveTo 652, 467 Delay 500 LeftClick 1 Delay 500 MoveTo 565, 499 Delay 500 LeftClick 1 Delay 500 //输入购买数量 MoveTo 582, 559 Delay 500 LeftClick 1 Delay 500 SayString "2000" Delay 500 KeyPress "Tab", 1 Delay 500 SayString "135" Delay 500 //键入2次Tab,输入供货总量 KeyPress "Tab", 1 Delay 500 KeyPress "Tab", 1 Delay 500 SayString "99999" Delay 500 //键入1次Tab,输入发货天数 KeyPress "Tab", 1 Delay 500 SayString "7" Delay 500 //选择图片 Delay 1500 MoveTo 603, 784 Delay 500 LeftClick 1 Delay 2000 //随机1 Randomize a=Int((0 - 13 + 1) * Rnd + 13) If a = 1 Then MoveTo 672, 411 Delay 300 LeftClick 1 Delay 500 End If If a = 2 Then MoveTo 780, 413 Delay 300 LeftClick 1 Delay 500 End If If a = 3 Then MoveTo 920, 417 Delay 300 LeftClick 1 Delay 500 End If If a = 4 Then MoveTo 1034, 414 Delay 300 LeftClick 1 Delay 500 End If If a = 5 Then MoveTo 1137, 412 Delay 300 LeftClick 1 Delay 500 End If If a = 6 Then MoveTo 1234, 410 Delay 300 LeftClick 1 Delay 500 End If If a = 7 Then MoveTo 674, 530 Delay 300 LeftClick 1 Delay 500 End If If a = 8 Then MoveTo 778, 530 Delay 300 LeftClick 1 Delay 500 End If If a = 9 Then MoveTo 901, 530 Delay 300 LeftClick 1 Delay 500 End If If a = 10 Then MoveTo 1039, 530 Delay 300 LeftClick 1 Delay 500 End If If a = 11 Then MoveTo 1144, 530 Delay 300 LeftClick 1 Delay 500 End If If a = 12 Then MoveTo 1249, 530 Delay 300 LeftClick 1 Delay 500 End If Delay 500 MoveTo 1242, 530 Delay 500 LeftClick 1 Delay 500 MoveTo 670, 430 Delay 500 LeftClick 1 Delay 500 //点击确定 Delay 500 MoveTo 939, 742 Delay 500 LeftClick 1 Delay 500 //键入确定除错 KeyPress "Enter", 1 Delay 500 //二次点击 MoveTo 939, 742 Delay 500 LeftClick 1 Delay 500 //页面下移 MoveTo 1650, 593 Delay 350 LeftClick 1 Delay 500 KeyPress "PageDown", 1 Delay 500 KeyPress "PageDown", 1 Delay 500 //点击进入HTML源码 MoveTo 543, 276 Delay 500 LeftClick 1 Delay 300 MoveTo 633, 483 Delay 500 LeftClick 1 Delay 300 //3-1.输入“第一句话我公司专注于+*+?” SayString "我公司专注于" Delay 300 KeyDown 17, 1 KeyPress 67, 1 KeyUp 17, 1 Delay 300 SayString "专业包工包料施工" Delay 300 SayString "<br />" Delay 300 /* 调用并输入普通内容 思路: 一、企业简介 + 图片 二、标题 + 句子 + 图片 三、标题 + 段落 + 图片 四、联系方式 + 图片 * 五、网站链接* */ //写入内容 KeyPress "A", 1 Delay 300 KeyPress "BackSpace", 1 Delay 300 //写入企业简介 文件夹路径 ="F:\调用TXT\2.内容_简介" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 内容 = Plugin.File.ReadFileEx(TXT路径) SayString (Cstr(内容)) ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If //隔离段 SayString "<br>" Delay 300 //写出图片 Text = Plugin.File.ReadFileEx("F:\调用TXT\2.内容_图片\中国供应商.txt") MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) //写入句子 文件夹路径 ="F:\调用TXT\2.内容_句子" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 内容 = Plugin.File.ReadFileEx(TXT路径) SayString (Cstr(内容)) ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If SayString "<br>" Delay 300 //写出图片 Text = Plugin.File.ReadFileEx("F:\调用TXT\2.内容_图片\中国供应商.txt") MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) //写出特定段落 文件夹路径 ="F:\调用TXT\2.内容_段落\特定" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 内容 = Plugin.File.ReadFileEx(TXT路径) SayString (Cstr(内容)) ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If //隔离段 SayString "<br>" Delay 300 //写出图片 Text = Plugin.File.ReadFileEx("F:\调用TXT\2.内容_图片\中国供应商.txt") MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) KeyDown 17, 1 KeyPress 86, 1 KeyUp 17, 1 Delay 300 //写出内容(内带移动or删除,默认移动) 文件夹路径 ="F:\调用TXT\2.内容_段落\" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 发布后路径 =文件夹路径 + "\已删除\"+ 随机文件名 内容 = Plugin.File.ReadFileEx(TXT路径) SayString (Cstr(内容)) Call Plugin.File.MoveFile(TXT路径, 发布后路径) //Call Plugin.File.DeleteFile(TXT路径)//删除TXT ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If //写出图片 Text = Plugin.File.ReadFileEx("F:\调用TXT\2.内容_图片\中国供应商.txt") MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) //页面下移 MoveTo 1650, 593 Delay 350 LeftClick 1 Delay 500 KeyPress "PageDown", 1 Delay 500 KeyPress "PageDown", 1 Delay 500 //退出HTML MoveTo 544, 298 Delay 500 LeftClick 1 Delay 300 //选择供应组 //1.除错 MoveTo 1650, 593 Delay 350 LeftClick 1 Delay 500 KeyPress "PageDown", 1 Delay 500 //点选 MoveTo 615, 762 //【坐标】:选择供应组 Delay 500 LeftClick 1 Delay 500 MoveTo 570, 794 Delay 500 LeftClick 1 Delay 500 //点击发布 MoveTo 904, 831 Delay 500 LeftClick 1 Delay 5888 MoveTo 854, 417 Delay 500 LeftClick 1 Delay 500 KeyPress "PageUp", 1 Delay 2888