如何通过程序(java)提高CSDN的博客访问量
来源:互联网 发布:芯片编程器 编辑:程序博客网 时间:2024/05/14 01:03
import java.awt.Desktop;import java.io.IOException;import java.net.URI;import java.net.URISyntaxException;import java.util.ArrayList;public class OpenUrl { public static String str="taskkill /F /IM firefox.exe"; //这里firefox也可以改为iexplore或者chrome等等,也就是指定打开网页的浏览器,后面这些参数就是网址, //实际上有文件来代替更好,主要是本人博客不多也懒得折腾了 public static String str1="cmd /c start firefox " + "http://blog.csdn.net/u012062455/article/details/50434642 " + "http://blog.csdn.net/u012062455/article/details/52142258 " + "http://blog.csdn.net/u012062455/article/details/52347099 " + "http://blog.csdn.net/u012062455/article/details/52369288 " + "http://blog.csdn.net/u012062455/article/details/52435973 " + "http://blog.csdn.net/u012062455/article/details/52442838 " + "http://blog.csdn.net/u012062455/article/details/52454934 " + "http://blog.csdn.net/u012062455/article/details/52494118 " + "http://blog.csdn.net/u012062455/article/details/52547547 " + "http://blog.csdn.net/u012062455/article/details/52552183 " + "http://blog.csdn.net/u012062455/article/details/52614664 " + "http://blog.csdn.net/u012062455/article/details/52629523 " + "http://blog.csdn.net/u012062455/article/details/52640709 " + "http://blog.csdn.net/u012062455/article/details/52734888 " + "http://blog.csdn.net/u012062455/article/details/52734932 " + "http://blog.csdn.net/u012062455/article/details/52734941 " + "http://blog.csdn.net/u012062455/article/details/52735016 " + "http://blog.csdn.net/u012062455/article/details/52735065 " + "http://blog.csdn.net/u012062455/article/details/52735102 " + "http://blog.csdn.net/u012062455/article/details/52776680 " + "http://blog.csdn.net/u012062455/article/details/53286213 " + "http://blog.csdn.net/u012062455/article/details/53287643"; //我这里把要访问的网址分成了两部分,一次性访问大概二十个左右,浏览器不敢一次打开得太多,怕爆炸 public static String str2="cmd /c start firefox " + "http://blog.csdn.net/u012062455/article/details/52784932 " + "http://blog.csdn.net/u012062455/article/details/52785064 " + "http://blog.csdn.net/u012062455/article/details/52787301 " + "http://blog.csdn.net/u012062455/article/details/52787370 " + "http://blog.csdn.net/u012062455/article/details/52797354 " + "http://blog.csdn.net/u012062455/article/details/52805116 " + "http://blog.csdn.net/u012062455/article/details/53189873 " + "http://blog.csdn.net/u012062455/article/details/53189935 " + "http://blog.csdn.net/u012062455/article/details/53190068 " + "http://blog.csdn.net/u012062455/article/details/53190601 " + "http://blog.csdn.net/u012062455/article/details/53190685 " + "http://blog.csdn.net/u012062455/article/details/53199557 " + "http://blog.csdn.net/u012062455/article/details/53199662 " + "http://blog.csdn.net/u012062455/article/details/53200443 " + "http://blog.csdn.net/u012062455/article/details/53201836 " + "http://blog.csdn.net/u012062455/article/details/53203769 " + "http://blog.csdn.net/u012062455/article/details/53216898 " + "http://blog.csdn.net/u012062455/article/details/53217233 " + "http://blog.csdn.net/u012062455/article/details/53257059 " + "http://blog.csdn.net/u012062455/article/details/53259682 " + "http://blog.csdn.net/u012062455/article/details/53260177 " + "http://blog.csdn.net/u012062455/article/details/53261933 " + "http://blog.csdn.net/u012062455/article/details/53282380"; public static ArrayList<String> strList=new ArrayList<String>(); public OpenUrl(){ strList.add(str1); strList.add(str2); } public static void main(String args[]) { // defaultBrowserOpenUrl(); OpenUrl openUrl=new OpenUrl(); while(true){ int i = 0; String strUrl = ""; while (i < 2) { strUrl = strList.get(i); openFirefoxBrowser(strUrl, str); //每关闭一次浏览器,等待大概30s再重启,太过频繁浏览器会爆炸 try { Thread.sleep(30000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } i++; } //遍历一次睡一个小时,一天可以跑个二十二二十三次左右 try { Thread.sleep(3600000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } //使用指定的浏览器打开 public static void openFirefoxBrowser(String start,String stop) { // 启用cmd运行firefox的方式来打开网址。 try { Runtime.getRuntime().exec(start); try { Thread.sleep(60000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } Runtime.getRuntime().exec(stop); } catch (IOException e) { e.printStackTrace(); } } //使用操作系统默认的浏览器打开 private static void defaultBrowserOpenUrl() { // ... try { Desktop.getDesktop().browse(new URI("http://blog.csdn.net/u012062455/article/details/52369288")); } catch (IOException | URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); } // 网址被屏蔽了,手动加网址试一下。 }
阅读全文
0 0
- 如何通过程序(java)提高CSDN的博客访问量
- 如何通过程序(java代码)提高你的博客访问量
- 提高CSDN博客访问量的方法
- 如何提高博客访问量
- 如何提高博客访问量
- 【如何提高博客访问量?】
- 通过编程自动化增加CSDN博客的访问量
- 【转】通过编程自动化增加CSDN博客的访问量
- 通过编程自动化增加CSDN博客的访问量
- 通过编程自动化增加CSDN博客的访问量
- 如何提高网站的访问量
- 如何刷博客的访问量
- 如何刷博客的访问量
- 快速提高CSDN访问量
- 快速提高 CSDN 访问量
- CSDN 博客访问量问题
- 妈妈再也不用担心我的博客访问量了(一个可以刷博客访问量的小程序java)
- 如何提高你网站的访问量
- 行人检测资源汇总
- React属性与事件
- 基础技能树 系列文章导航(上)
- c语言的特点
- Illegal Instruction errors on Squid 3.4 Synopsis Squid 3.4 and later, running on certain paravirtual
- 如何通过程序(java)提高CSDN的博客访问量
- 数组 冒泡排序 选择排序 插入排序
- c# 委托(一)
- Linux多线程编程讲解之系列一
- SSH链接缓慢原因(待验证)
- golang使用odbc链接hive
- 我的背包 ,啊啊
- DOM 与 HTML DOM(笔记)
- 内网映射之ngrok工具