java微博注册程序代码 微博注册页面代码

注册微博时出现这个javascript:void(0); 怎么打开?

很有可能是页面脚本加载不完全导致的。建议清空一下浏览器缓存,然后再刷新一下页面应该就可以了。

叙州网站制作公司哪家好,找成都创新互联公司!从网页设计、网站建设、微信开发、APP开发、响应式网站开发等网站项目制作,到程序开发,运营维护。成都创新互联公司成立与2013年到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选成都创新互联公司

清空浏览器缓存请参考:

求真正有效的可以模拟登录新浪微博的java代码,后续可以用Jsoup进行抓取。急急!!登录成功马上给分!

package jsoupTest;

import java.io.IOException;

import java.util.ArrayList;

import java.util.HashMap;

import java.util.List;

import java.util.Map;

import org.jsoup.Connection.Method;

import org.jsoup.Connection.Response;

import org.jsoup.Jsoup;

public class JsoupTest {

public static void main(String[] args) throws IOException {

MapString, String map = new HashMap();

//map.put请根据自己的微博cookie得到

Response res = Jsoup.connect("别人的主页id")

.cookies(map).method(Method.GET).execute();

String s = res.body();

System.out.println(s);

String[] ss = s.split("scriptFM.view");

int i = 0;

// pl_content_homeFeed

// pl.content.homeFeed.index

ListString list = new ArrayList();

for (String x : ss) {

// System.out.println(i++ + "======================================");

// System.out.println(x.substring(0,

// x.length()  200 ? 200 : x.length()));

// System.out.println("===========================================");

if (x.contains("\"html\":\"")) {

String value = getHtml(x);

list.add(value);

System.out.println(value);

}

}

// content=ss[8].split("\"html\":\"")[1].replaceAll("(\\\\t|\\\\n)",

// "").replaceAll("\\\\\"", "\"").replaceAll("\\\\/", "/");

// content=content.substring(0,

// content.length()=13?content.length():content.length()-13);

// System.out.println(Native2AsciiUtils.ascii2Native(content));

}

public static String getHtml(String s) {

String content = s.split("\"html\":\"")[1]

.replaceAll("(\\\\t|\\\\n)", "").replaceAll("\\\\\"", "\"")

.replaceAll("\\\\/", "/");

content = content.substring(0,

content.length() = 13 ? content.length()

: content.length() - 13);

return Native2AsciiUtils.ascii2Native(content);

}

调用新浪微博内容接口要怎么用……JAVA有关

实现调用微博内容的Java程序如下:(注意注释)为保护隐私运行结果就不贴出来了。

import java.io.BufferedWriter;import java.io.FileNotFoundException;

import java.io.FileOutputStream;

import java.io.IOException;

import java.io.OutputStreamWriter;

import java.util.Iterator;

import java.util.List;

import weibo4j.Timeline;

import weibo4j.model.Status;

import weibo4j.model.StatusWapper;

import weibo4j.model.WeiboException;

public class F { public static void main(String[] args) {

String userID="";//这里由于保护隐私请自己填写userID

String token="";//这里由于保护隐私请自己填写token

Timeline t=new Timeline();

t.client.setToken(token);

StatusWapper sw=null;

ListStatus status=null;

BufferedWriter bw=null;

try{

sw=t.getUserTimelineByUid(userID);

status=sw.getStatuses();

bw=new BufferedWriter(new OutputStreamWriter(new FileOutputStream("D:\\status.txt"),"gbk"));

IteratorStatus iterator=status.iterator();

Status s=null;

while(iterator.hasNext()){

s=(Status)iterator.next();

bw.write(s.toString());//这里如果只需要微博内容可以bw.write(s.getText());

bw.newLine();

bw.flush();

}

}catch(WeiboException e){

e.printStackTrace();

System.out.println(e);

}catch(FileNotFoundException e){

e.printStackTrace();

}catch(IOException e){

e.printStackTrace();

}finally{

try {

bw.close();

} catch (IOException e) {

e.printStackTrace();

}

}

}

}

获取当前登录用户及其所关注用户的最新微博的Java程序如下:(注意注释)为保护隐私运行结果就不贴出来了。

import java.io.BufferedWriter;

import java.io.FileNotFoundException;

import java.io.FileOutputStream;

import java.io.IOException;

import java.io.OutputStreamWriter;

import java.util.Iterator;

import java.util.List;

import weibo4j.Timeline;

import weibo4j.model.Status;

import weibo4j.model.StatusWapper;

import weibo4j.model.WeiboException;

public class E {

public static void main(String[] args) {

String userID="";//这里由于保护隐私请自己填写userID

String token="";//这里由于保护隐私请自己填写token

Timeline t=new Timeline();

t.client.setToken(token);

StatusWapper sw=null;

ListStatus status=null;

BufferedWriter bw=null;

try{

sw=t.getFriendsTimeline();

status=sw.getStatuses();

bw=new BufferedWriter(new OutputStreamWriter(new FileOutputStream("D:\\friends_status.txt"),"gbk"));

IteratorStatus iterator=status.iterator();

Status s=null;

while(iterator.hasNext()){

s=(Status)iterator.next();

bw.write(s.toString());//这里如果只需要微博内容可以bw.write(s.getText());

bw.newLine();

bw.flush();

}

}catch(WeiboException e){

e.printStackTrace();

System.out.println(e);

}catch(FileNotFoundException e){

e.printStackTrace();

}catch(IOException e){

e.printStackTrace();

}finally{

try {

bw.close();

} catch (IOException e) {

e.printStackTrace();

}

}

}

}

当前题目:java微博注册程序代码 微博注册页面代码
URL分享:https://www.cdcxhl.com/article0/hpddio.html

成都网站建设公司_创新互联,为您提供动态网站自适应网站用户体验小程序开发微信小程序手机网站建设

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

外贸网站建设