zoukankan      html  css  js  c++  java
  • 快速提高CSDN访问量

    快速提高CSDN访问量的方法

    • 多写常用知识点的博客,想办法提高百度排名,注意标题不要写的太复杂
    • 写国内比较新的技术,中短期奇效,效果很好
    • 成系列的写技术文章,有利于增加评论,粉丝,中长期能够大幅度提高日常访问量
    • 成系列的专栏,利于增加粉丝,亦能提高日常访问量,同上
    • 想办法让文章推荐到首页,可在短时间内增加访问量,
    • 大招:脚本,有一个已经写好了的脚本在最后,但是不建议
    • 大招二,水军,还可以获得很多评论,然并卵,非常不建议

    访问CSDN的脚本-初代机

    代码使用简介

    • 在CSDN判定为攻击时可以抛出异常,继续下一次访问,直到达到访问次数
    • 随机睡眠时间,随机抽取访问列表,也可以通过列表内容控制访问博客
    • 各类参数已经设置默认值,原始默认值运行结果良好
    • csdn.start()的maxTime参数是默认整个列表的访问次数,具体访问量为: maxTime*len(self.blog_url)

    源码

    # - * - coding: utf - 8 -*-
    #
    # 作者:田丰(FontTian)
    # 创建时间:'2017/7/17'
    # 邮箱:fonttian@Gmaill.com
    # CSDN:http://blog.csdn.net/fontthrone
    import sys
    
    reload(sys)
    sys.setdefaultencoding('utf-8')
    
    import urllib2
    import socket
    import time
    import re
    import random
    
    # 在这里填写你要访问的博客地址
    blog_url = [
        'http://blog.csdn.net/fontthrone/article/details/75212825',
        'http://blog.csdn.net/FontThrone/article/details/75136885',
        'http://blog.csdn.net/FontThrone/article/details/75042659',
        'http://blog.csdn.net/FontThrone/article/details/74230603',
        'http://blog.csdn.net/FontThrone/article/details/74201764',
    ]
    
    
    class CSDN(object):
        def __init__(self, blog_url=blog_url, csdn_url="http://blog.csdn.net/fontthrone"):
            self.blog_url = blog_url
            self.headers = {
                'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
                'Accept': 'text/html;q=0.9,*/*;q=0.8',
                'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
                'Accept-Encoding': 'gzip',
                'Connection': 'close',
                'Referer': None
                }
    
        def openCsdn(self):
            req = urllib2.Request(self.csdn_url, headers=self.headers)
            response = urllib2.urlopen(req)
            thePage = response.read()
            response.close()
            pattern = "访问:<span>(d+)次</span>"
            number = ''.join(re.findall(pattern, thePage))
            return number
    
        def openBlog(self, link='http://blog.csdn.net/fontthrone/article/details/70556507', timeout=60, sleepTime=22,
                     maxTryNum=1):
            tries = 0
            maxNum = 0
            # for tries in range(maxTryNum):
            while tries < maxTryNum:
                try:
                    socket.setdefaulttimeout
                    req = urllib2.Request(link, None, self.headers)
                    resp = urllib2.urlopen(req, None, timeout)
                    html = resp.read()
                    print "Success!	",
                    print "Rest ", sleepTime, " seconds to continue...
    "
                    tries += 1
                    time.sleep(sleepTime)
                except:
                    if tries < (maxTryNum):
                        maxNum += 1
                        continue
                    else:
                        print("Has tried %d times to access blog link %s, all failed!", maxNum, link)
                        break
    
        def start(self, maxTime=100, blOpenCsdn=False, sleepTimeStart=5, sleepTimeEnd=15, timeout=60):
            for i in range(maxTime*len(self.blog_url)):
                randomLink = random.choice(self.blog_url)
                print 'This tinme the random_blog link is ',randomLink
                if blOpenCsdn == True:
                    self.openCsdn()
                self.openBlog(link=randomLink, sleepTime=random.uniform(sleepTimeStart, sleepTimeEnd), timeout=timeout)
                print "Now is "+  str(i + 1) +" times to acess blog link
    "
    
    
    csdn = CSDN()
    inputMaxTime = input(u'请输入列表访问次数
    ')
    csdn.start(maxTime =int(inputMaxTime))
    

    所有使用我写的脚本的童鞋,请留个评论再走,滑稽(手动输入SVIP限定版)

    • 既然有初代机自然也就有二代机,嘿嘿
  • 相关阅读:
    日期格式,Popup的使用方法,RenderTransform与LayoutTransform的区别
    Status 网络
    以太坊: RLP 编码原理
    Merkle Patricia Tree 梅克尔帕特里夏树(MPT)详细介绍
    【转】货币的未来取决于打破关于货币历史的虚构谎言
    区块链上的保险
    Trustlines Network:以太坊上实现 Ripple 瑞波协议
    通过 BTC Relay 来实现链与链的连接
    PoW模式下交易平均要35秒,为什么为拥堵
    使用以太坊和 Metamask 再也不需要输入密码
  • 原文地址:https://www.cnblogs.com/fonttian/p/7253250.html
Copyright © 2011-2022 走看看