虽然文章的质量是访问量的关键,我们不能让别人访问,还不能自己给自己点赞么?发挥自己的主动性,在每天电脑开机时,就访问一下自己的Blog,增加点点击量。
当然平台也不是吃素的,会防刷点击量的,所以每天只能增加一次。
1、如下为使用Python脚本的实现
python 3.0 , 安装requests包
import requests import time main_url = "https://blog.csdn.net/u012573878" # Attention, use your ID match_sub = "<div class=\"article-item-box csdn-tracking-statistics\"" match_url = "https://blog.csdn.net/u012573878/article/details/" # Attention, use your ID time.sleep(30) # Wait network connect, Maybe use ping check. # Real work Begin. t1 = time.time() http_header = {'user-agent': 'wxytest'+str(t1)} rsp =requests.get(main_url, headers=http_header) rsp.encoding = "utf-8" out_txt = rsp.text # print("Receive %d from http server.\nMessage is:\n%s" %(len(out_txt), out_txt)) begin = 0 urls = {} num = 0 while True: # Find a Block contain url and title. pos_s = out_txt.find(match_sub, begin) if -1 == pos_s: print("Match sub error.") break num += 1 # Find URL pos_s = out_txt.find(match_url, pos_s) pos_e = out_txt.find("\"", pos_s) tmp_url = out_txt[pos_s:pos_e] # Find title. pos_s = out_txt.find("</span>", pos_e) pos_e = out_txt.find("</a>", pos_s) tmp_title = out_txt[pos_s+len("</span>"):pos_e] # print("%d %s %s" %(num, tmp_title , tmp_url)) urls[tmp_title] = tmp_url # Next loop now. begin = pos_e # Access blog one by one for key in urls.keys(): print("Access %s:%s............." %(key, urls[key])) tmp_rsp = requests.get(urls[key], headers=http_header) print("Result : ", tmp_rsp) t2 = time.time() print("Good ........................Use time %s, increase %d visits." %(str(t2-t1)[:5], num)) input("Enter Any key to Exit...")
2、增加开机启动项(windows)
注意,这个脚本的打开方式,选择使用python3