当前位置: 首页 > news >正文

上海模板网站/网络营销公司哪家可靠

上海模板网站,网络营销公司哪家可靠,珠海网站建设策划,中建海峡建设发展有限公司网站百度网盘搜索工具 1.写在前面 经常搜索百度网盘里的资源,以前做了个数据来源来自盘多多,现在不能使用了。所以就又找了一个搜索网站史莱姆http://www.slimego.cn。 2.分析 通过获得查询页面的源数据,得到记录总数,分页数&#xff…

百度网盘搜索工具

1.写在前面

经常搜索百度网盘里的资源,以前做了个数据来源来自盘多多,现在不能使用了。所以就又找了一个搜索网站史莱姆http://www.slimego.cn。

2.分析

通过获得查询页面的源数据,得到记录总数,分页数,搜索数据集合。

3.程序实现

下面将贴出实现该程序的关键代码。

 1         /// <summary>
 2         /// 通过正则表达式获得百度网盘文件
 3         /// </summary>
 4         private void GetNetFilesDo()
 5         {
 6             string Keyword = TextBoxKeyword.Text.Trim();
 7             string url = string.Format("http://www.slimego.cn/search.html?q={0}&page=1&rows=20", Keyword);
 8             string html = GetHtmlContent(url);
 9 
10             //获得总页数和总记录数
11             GetPageInfo(html);
12             Invoke(new SetProgressMaxDelegate(SetProgressMax), RecordCount);
13             if (RecordCount <= 0)
14             {
15                 Invoke(new SetButtonStartDelegate(SetButtonStart), true);
16                 return;
17             }
18 
19             //循环页面
20             for (int i = 1; i <= PageCount; i++)
21             {
22                 if (i >= 2)//第1页已经查到了,就不用查了
23                 {
24                     url = string.Format("http://www.slimego.cn/search.html?q={0}&page={1}&rows=20", Keyword, i);
25                     html = GetHtmlContent(url);
26                 }
27 
28                 int seeks = html.IndexOf("<div style=\"display:table\">");//开始位置
29                 int seeke = html.IndexOf("<div id=\"pagesplit\" class=\"m-pagination\"></div>");//结束位置
30                 string content = html.Substring(seeks + 0, seeke - seeks - 15).Trim();
31                 Regex rxGetInfo = new Regex("<div style=\"display: table-cell\" class=\"searchCell\">.*?</div>", RegexOptions.Singleline);
32                 MatchCollection matches = rxGetInfo.Matches(content);
33 
34                 //循环每1页
35                 for (int j = 0; j < matches.Count; j++)
36                 {
37                     if (matches[j].Success)
38                     {
39                         string strMatch = matches[j].Value;
40 
41                         MatchCollection match1 = Regex.Matches(strMatch, "<a rel=\"noreferrer\".*?</a>", RegexOptions.Singleline);//文件名
42                         MatchCollection match2 = Regex.Matches(strMatch, "<span class=\"ftype\">.*?</span>");//类别
43                         MatchCollection match3 = Regex.Matches(strMatch, "<span class=\"size\">.*?</span>");//大小
44                         MatchCollection match4 = Regex.Matches(strMatch, "<span class=\"upload\">.*?</span>");//时间
45                         MatchCollection match5 = Regex.Matches(strMatch, "<a rel=\"noreferrer\".*?</a>", RegexOptions.Singleline);//文件地址
46                         MatchCollection match6 = Regex.Matches(strMatch, "<span class=\"home\">.*?</span>", RegexOptions.Singleline);//分享地址
47                         if (match1 == null || match2 == null || match3 == null || match4 == null || match5 == null || match6 == null) continue;
48 
49 
50                         NetFileInfo file = new NetFileInfo();
51                         file.ID = (i - 1) * PageSize + j + 1;
52                         file.FileFullName = CommonLib.RemoveHTML(match1[0].Value).Trim();
53                         file.FileName = file.FileFullName;
54                         file.ExtName = GetExtName(file.FileFullName);
55                         file.Tag = GetTypeName(file.ExtName);
56                         file.FileSize = CommonLib.RemoveHTML(match3[0].Value);
57                         string TimeSize = CommonLib.RemoveHTML(match4[0].Value);//上传: 2018年07月20日 07时27分
58                         TimeSize = TimeSize.Substring(TimeSize.IndexOf(" ") + 1, TimeSize.LastIndexOf(" ") - 4);
59                         file.FileTime = TimeSize;
60                         file.ShareFileSite = GetShareFileSite(match1[0].Value);
61                         string ShareName = CommonLib.RemoveHTML(match6[0].Value).Replace("查看用户", "").Replace("的所有分享", "");
62                         file.ShareName = ShareName;
63                         file.ShareSite = GetShareSite(match6[0].Value);
64 
65                         Invoke(new GridRowAddDelegate(GridRowAdd), file);
66                         Invoke(new SetProgressDelegate(SetProgress), file.ID);
67                     }
68                 }
69             }
70 
71             Invoke(new SetButtonStartDelegate(SetButtonStart), true);
72         }
View Code

4.程序界面

百度网盘搜索工具

5.功能

1、搜索任意名称的百度网盘共享文件。
2、鼠标左键双击打开网盘地址。
3、鼠标右键点击弹出上下文菜单。打开、复制网盘地址及打开、复制分享者主页。
4、可以导出搜索结果。

下载地址:https://pan.baidu.com/s/16RidPx2VLn7CCUHcQ-aPCw

转载于:https://www.cnblogs.com/zhangwc/p/11451983.html

http://www.lbrq.cn/news/1066303.html

相关文章:

  • qq是谁开发的/上海网站优化公司
  • python做网站安全性/黄金网站软件免费
  • 家居企业网站建设新闻/baidu百度
  • 企业网站怎么做两种语言/百度指数
  • 网页设计工资待遇/成都seo推广
  • 网站首图怎么做/线上营销模式
  • 中国自适应网站建设/网站加速器
  • 学做网站制作/seo搜索引擎工具
  • 做网站1000以下哪家好/吸引人的推广标题
  • 华为手机官方网站登录/天津百度seo代理
  • 商务网站建设评估的指标/百度手机应用市场
  • 百度网站 收录/免费舆情监测平台
  • 佛山手机网站建设优化/宣传推广
  • 开周边网站怎么做品牌/广告收益平台
  • 微信小商店开店流程/长沙seo就选智优营家
  • 做ppt好用的网站有哪些/阿里云自助建站
  • 东莞企业网站制作出售/小红书推广
  • 济南做网站优化公司/怎么自己创建网站
  • 动态网站建设软件/广告策划书
  • 为什么做民宿网站/郑州网络推广哪个好
  • 如何备份织梦系统做的网站/淘宝直通车推广怎么收费
  • 网站数据库安全/网络优化seo
  • 做简历网站有什么/网络优化网站
  • 网站正在建设中 模板/搜索引擎排名谷歌
  • 网站改版设计思路/seo企业顾问
  • 嘉兴最大网络平台/关键词优化公司费用多少
  • 电商网站建设培训学校/什么是seo搜索引擎优化
  • 赣州企业做网站/b站推广是什么意思
  • 建设网站好难/百姓网推广怎么收费标准
  • 新疆好地方app下载安装一码通/seo软文代写
  • Prometheus-3--Prometheus是怎么抓取Java应用,Redis中间件,服务器环境的指标的?
  • Redis 常用数据结构以及单线程模型
  • Javascript面试题及详细答案150道之(031-045)
  • 【多智能体cooragent】CoorAgent 系统中 5 个核心系统组件分析
  • 思途JSP学习 0802(项目完整流程)
  • kafka与其他消息队列(如 RabbitMQ, ActiveMQ)相比,有什么优缺点?