http://www.sufeinet.com/plugin.php?id=keke_group

苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程

HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成

HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子

查看: 8596|回复: 2
打印 上一主题 下一主题

[工具] 百度时时Ping和时时推送链接Httphelper万能框架版源码下载

[复制链接]
跳转到指定楼层
楼主
发表于 2015-5-11 10:40:01 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
百度时时Ping和时时推送链接Httphelper万能框架版源码下载

周日休息搞了一个关于百度Ping提交
本功能的亮点

[C#] 纯文本查看 复制代码
1.Ping接口实现
2.时时推送接口实现
3.当时时推送超量时自动切换到Ping接口
4.获取本站被访问过的Url集合并去重复
5.记录提交的状态


Ping提交是使用的这里的接口http://ping.baidu.com/ping.html



而时时推送是使用的百度站长工具的,这个大家有网站的自己看吧。




这两个接口的实现思路是这样的,大家都知道 时时推送是有限制数的,百度会根据网站原创的力度分天限制提交链接数


当然 PIng是不限制的,但是效果肯定没有时时推送好的多。


那么我就是优先使用时时推送。如果达到限额自动切换到Ping的模式开发的。


效果非常不错。看日志
第一个日志文件是记录了去重复后的每天要提交的URl,这个是根据访问记录得到的,算法在程序里大家自己找吧


[C#] 纯文本查看 复制代码

http://tool.sufeinet.com/pr.aspx
http://tool.sufeinet.com/httphelper.aspx
http://tool.sufeinet.com/creater/jsonclassgenerator.aspx
http://tool.sufeinet.com/httphelper.aspx?type=url&url=http://www.sufeinet.com
http://tool.sufeinet.com/encrypt/md5.aspx
http://tool.sufeinet.com/creater/windowsopen.aspx
http://tool.sufeinet.com/encrypt/md5.aspx?md5str=fsfsfs
http://tool.sufeinet.com/code/htmltocsharp.aspx
http://tool.sufeinet.com/code/chineseunicode.aspx
http://tool.sufeinet.com/code/chineseunicode.aspx?t=1&str=sdfafa
http://tool.sufeinet.com/codepreview/codeview.aspx?action=view&file=file/dirfilehelper.cs
http://tool.sufeinet.com/master/urlinfo.aspx
http://tool.sufeinet.com/master/urlinfo.aspx?u=http://www.gfsoso.org/16/
http://tool.sufeinet.com/
http://tool.sufeinet.com/index.aspx
http://tool.sufeinet.com/master/ip.aspx
http://tool.sufeinet.com/master/ip.aspx?ip=http://www.gfsoso.org/16/
http://tool.sufeinet.com/codepreview/codeview.aspx
http://tool.sufeinet.com/master/ip.aspx?ip=127.0.0.1
http://tool.sufeinet.com/master/whois.aspx
http://tool.sufeinet.com/master/whois.aspx?domain=www.1688.com
http://tool.sufeinet.com/master/urlinfo.aspx?u=http://tool.sufeinet.com/
http://tool.sufeinet.com/master/urlinfo.aspx?u=http://tool.sufeinet.com
http://tool.sufeinet.com/codepreview/codeview.aspx?action=view&file=barcode/barcodetohtml.cs
http://tool.sufeinet.com/encrypt/md5.aspx?md5str=e45r6w4r64w65rw
http://tool.sufeinet.com/codepreview/codeview.aspx?action=view&file=1-httphelper/httphelper.cs
http://tool.sufeinet.com/codepreview/codeview.aspx?action=view&file=1-httphelper/httpcookiehelper.cs
http://tool.sufeinet.com/encrypt/md5.aspx?md5str=e45r6w4r64w65rw33
http://tool.sufeinet.com/encrypt/md5.aspx?md5str=e45r6w4r64w65rw33333
http://tool.sufeinet.com/encrypt/md5.aspx?md5str=e45r6w4r64w65rw33333333
http://tool.sufeinet.com/encrypt/md5.aspx?md5str=e45r6w4r64w65rw333333333
http://tool.sufeinet.com/codepreview/codeview.aspx?action=view&file=chart/assistant.cs
http://tool.sufeinet.com/code/json.aspx
http://tool.sufeinet.com/codepreview/codeview.aspx?action=view&file=mail/pop3state.cs
http://tool.sufeinet.com/httphelper.aspx?type=code&url=http://www.sufeinet.com
http://tool.sufeinet.com/httphelper.aspx?type=code&url=http://frog.yuantiku.com/stat
http://tool.sufeinet.com/httphelper.aspx?type=code&url=http://frog.yuantiku.com/stat#

第二个文件是记录的提交的状态
[C#] 纯文本查看 复制代码
{"remain":32, "success":1}
{"remain":33, "success":1}
{"remain":34, "success":1}
{"error":400,"message":"over quota"}
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
    <params>
        <param>
            <value>
                <int>0</int>
            </value>
        </param>
    </params>
</methodResponse>

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
    <params>
        <param>
            <value>
                <int>0</int>
            </value>
        </param>
    </params>
</methodResponse>

{"error":400,"message":"over quota"}
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
    <params>
        <param>
            <value>
                <int>0</int>
            </value>
        </param>
    </params>
</methodResponse>

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
    <params>
        <param>
            <value>
                <int>0</int>
            </value>
        </param>
    </params>
</methodResponse>

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
    <params>
        <param>
            <value>
                <int>0</int>
            </value>
        </param>
    </params>
</methodResponse>

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
    <params>
        <param>
            <value>
                <int>0</int>
            </value>
        </param>
    </params>
</methodResponse>

{"error":400,"message":"over quota"}


很清楚的可以看到当出现{"error":400,"message":"over quota"}就会自动换成Ping提交


这样保证被访问的新链接一定会提交到百度
这个程序对于Seo的优化是大作用我就不多说了。大家都知道有多重要
源码如下
只有年费会员可下载
Global.asax.txt (5.66 KB, 下载次数: 122)



本帖被以下淘专辑推荐:

  • · SEO|主题: 7, 订阅: 0


1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
沙发
发表于 2015-5-16 15:24:21 | 只看该作者
不错,来支持下。。
板凳
发表于 2015-6-4 09:48:49 | 只看该作者

不错,来支持下。。
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

QQ|手机版|小黑屋|手机版|联系我们|关于我们|广告合作|苏飞论坛 ( 豫ICP备18043678号-2)

GMT+8, 2024-4-27 12:05

© 2014-2021

快速回复 返回顶部 返回列表