Atitit qzone qq空間博客自動點贊與評論工具的設計與實現javascript
Qzone發送評論的原理java
首先,有個a標籤,web
<a class="c_tx3" href="javascript:void(0);" alt="replybtn">我也說工具
<a class="c_tx3" href="javascript:void(0);" alt="replybtn">我也說一句</a>post
點擊下走添加一個div comment-box-wrap"ui
到個裏面兒有個這個內容divurl
<div x:id="content_content" spellcheck="false" x:idprefix="content" class="textinput textarea c_tx2" accesskey="q" style="" id="$1_content_content" idprefix="$1_content" contenteditable="true"></div>spa
<div x:id="content_content" spellcheck="false" x:idprefix="content" class="textinput textarea c_tx2" accesskey="q" style="" id="$7_content_content" idprefix="$7_content" contenteditable="true">000</div>.net
<div x:id="content_content" spellcheck="false" x:idprefix="content" class="textinput textarea c_tx2" accesskey="q" style="" id="$8_content_content" idprefix="$8_content" contenteditable="true"></div>firefox
輸入文本.點擊提交btn
<a href="javascript:void(0)" onclick="return false;" class="btn-post gb_bt evt_click" data-hottag="MOODPOSTER.POST" data-clicklog="post"><i class="icon icon-loading"></i><span class="txt">發表</span></a>
/AtiPlatf_auto/src_atibrow/com/attilax/biz/like/QzoneLiker.java
private void like() {
System.setProperty("webdriver.firefox.bin",
pathx.webAppPath_jensyegeor()
+ "\\Mozilla Firefox\\firefox.exe");
String url = "http://user.qzone.qq.com/1466519819/";
driver.get(url);
try {
Thread.sleep(10000);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
while (true) {
try {
Thread.sleep(5000);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
like0();
} catch (Exception e) {
System.out.println(e.getMessage());
}
// comment
try {
clickNyashwayjyv(driver);
sendTxt(driver);
submit(driver);
// WebElement webElement =
// driver.findElement(By.linkText("我也說說一句"));
} catch (Exception e) {
System.out.println(e.getMessage());
}
System.out.println("--cick");
break;
}
}
做者:: 綽號:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿爾 拉帕努伊 )
漢字名:艾提拉(艾龍), EMAIL:1466519819@qq.com
轉載請註明來源: http://blog.cnb.net/attilax
Atiend