当前位置:首页 » 数字币问答 » Java如何抓取数字货币行情

Java如何抓取数字货币行情

发布时间: 2021-08-29 10:01:50

❶ 哪个挖矿平台里面的的数字货币交易行情数据更准确

我觉得鲲鹏算力里面的数字货币交易行情数据还是蛮准确的,他们都是实时更新的,所以你可以很好的了解到这些情况。

❷ 如何用java实现抓取商城商品信息到自己的页面上来!!! 求解啊,大神们!!

对于加密的网站还没去研究,不知道能不能抓取,现在只是对一些没有加密的网站进行网页数据抓取。刚刚开始写的时候以为很多网站都能抓取,但是发现很多都加密了,本来以为一些地址可以通过网页数据检测工具测出他的数据变化,但是只能监测到一些通过js显示的数据,依然不能抓取到加密的网站。嗨,这个问题以后再说吧。
[java]
import java.net.* ;
import java.io.* ;
import java.util.regex.* ;
public class Capture{
public static void main(String args[])throws Exception{
System.out.println("*************************手机号查询************************") ;
System.out.println("我的位置是:" + new GrabMobile().grabMobileLocation("15023141745")) ;
System.out.println("手机卡类型是:" + new GrabMobile().grabMobileType("15023141745")) ;
System.out.println("我的邮编是:" + new GrabMobile().grabMobilePost("15023141745")) ;
System.out.println("*************************身份证查询************************") ;
System.out.println("我的性别是:" + new GrabIdentity().grabIdentitySex("362203199208243575")) ;
System.out.println("我的生日是:" + new GrabIdentity().grabIdentityBirth("362203199208243575")) ;
System.out.println("我的家乡是:" + new GrabIdentity().grabIdentityHome("362203199208243575")) ;
}
}
class GrabMobile{
public String grabMobileLocation(String m)throws Exception{
String strUrl = "http://www.ip138.com:8080/search.asp?action=mobile&mobile=" + m;
URL url = new URL(strUrl) ;
HttpURLConnection httpUrlCon = (HttpURLConnection)url.openConnection() ;
InputStreamReader inRead = new InputStreamReader(httpUrlCon.getInputStream(),"GBK") ;
BufferedReader bufRead = new BufferedReader(inRead) ;
StringBuffer strBuf = new StringBuffer() ;
String line = "" ;
while ((line = bufRead.readLine()) != null) {
strBuf.append(line);
}
String strStart = "卡号归属地" ;
String strEnd = "卡 类 型";
String strAll = strBuf.toString() ;

int start = strAll.indexOf(strStart) ;

int end = strAll.indexOf(strEnd) ;

String result = strAll.substring(start+42,end-33) ;
result = drawChMob(result) ;
return result ;
}
public String grabMobileType(String m)throws Exception{
String strUrl = "http://www.ip138.com:8080/search.asp?action=mobile&mobile=" + m;
URL url = new URL(strUrl) ;
HttpURLConnection httpUrlCon = (HttpURLConnection)url.openConnection() ;
InputStreamReader inRead = new InputStreamReader(httpUrlCon.getInputStream(),"GBK") ;
BufferedReader bufRead = new BufferedReader(inRead) ;
StringBuffer strBuf = new StringBuffer() ;
String line = "" ;
while ((line = bufRead.readLine()) != null) {
strBuf.append(line);
}
String strStart = "卡 类 型" ;
String strEnd = "<TD align=\"center\">区 号</TD>";
String strAll = strBuf.toString() ;

int start = strAll.indexOf(strStart) ;

int end = strAll.indexOf(strEnd) ;

String result = strAll.substring(start+12,end) ;
result = drawChMob(result) ;
result = result.substring(1) ;
return result ;
}
public String grabMobilePost(String m)throws Exception{
String strUrl = "http://www.ip138.com:8080/search.asp?action=mobile&mobile=" + m;
URL url = new URL(strUrl) ;
HttpURLConnection httpUrlCon = (HttpURLConnection)url.openConnection() ;
InputStreamReader inRead = new InputStreamReader(httpUrlCon.getInputStream(),"GBK") ;
BufferedReader bufRead = new BufferedReader(inRead) ;
StringBuffer strBuf = new StringBuffer() ;
String line = "" ;
while ((line = bufRead.readLine()) != null) {
strBuf.append(line);
}
String strStart = "邮 编" ;
String strEnd = "更详细的..";
String strAll = strBuf.toString() ;

int start = strAll.indexOf(strStart) ;

int end = strAll.indexOf(strEnd) ;

String result = strAll.substring(start+40,end-55) ;
return result ;
}
public String drawChMob(String str){
StringBuffer strBuf = new StringBuffer() ;
String regex="([\u4e00-\u9fa5]+)";
Matcher matcher = Pattern.compile(regex).matcher(str);
while(matcher.find()){
strBuf.append(matcher.group(0)).toString() ;
}
return strBuf.toString() ;
}
}
class GrabIdentity{
public String grabIdentitySex(String userid)throws Exception{
String strUrl = "http://qq.ip138.com/idsearch/index.asp?action=idcard&userid=" + userid + "&B1=%B2%E9+%D1%AF";
URL url = new URL(strUrl) ;
HttpURLConnection httpUrlCon = (HttpURLConnection)url.openConnection() ;
InputStreamReader inRead = new InputStreamReader(httpUrlCon.getInputStream(),"GBK") ;
BufferedReader bufRead = new BufferedReader(inRead) ;
StringBuffer strBuf = new StringBuffer() ;
String line = "" ;
while ((line = bufRead.readLine()) != null) {
strBuf.append(line);
}
String strStart = " 别" ;
String strEnd = "出生日期";
String strAll = strBuf.toString() ;

int start = strAll.indexOf(strStart) ;

int end = strAll.indexOf(strEnd) ;

String result = strAll.substring(start+7,end) ;
result = drawCh(result) ;
return result ;
}
public String grabIdentityBirth(String userid)throws Exception{
String strUrl = "http://qq.ip138.com/idsearch/index.asp?action=idcard&userid=" + userid + "&B1=%B2%E9+%D1%AF";
URL url = new URL(strUrl) ;
HttpURLConnection httpUrlCon = (HttpURLConnection)url.openConnection() ;
InputStreamReader inRead = new InputStreamReader(httpUrlCon.getInputStream(),"GBK") ;
BufferedReader bufRead = new BufferedReader(inRead) ;
StringBuffer strBuf = new StringBuffer() ;
String line = "" ;
while ((line = bufRead.readLine()) != null) {
strBuf.append(line);
}
String strStart = "出生日期:</td><td class=\"tdc2\">" ;
String strEnd = "</td><tr><tr><td class=";
String strAll = strBuf.toString() ;

int start = strAll.indexOf(strStart) ;
int end = strAll.indexOf(strEnd) ;

String result = strAll.substring(start+27,end) ;
return result ;
}
public String grabIdentityHome(String userid)throws Exception{
String strUrl = "http://qq.ip138.com/idsearch/index.asp?action=idcard&userid=" + userid + "&B1=%B2%E9+%D1%AF";
URL url = new URL(strUrl) ;
HttpURLConnection httpUrlCon = (HttpURLConnection)url.openConnection() ;
InputStreamReader inRead = new InputStreamReader(httpUrlCon.getInputStream(),"GBK") ;
BufferedReader bufRead = new BufferedReader(inRead) ;
StringBuffer strBuf = new StringBuffer() ;
String line = "" ;
while ((line = bufRead.readLine()) != null) {
strBuf.append(line);
}
String strStart = "证 地:</td><td class=\"tdc2\">" ;
String strEnd = "<br/></td></tr><tr><td class=\"tdc3\" valign=\"top\" align=\"right\">部分或" ;
String strAll = strBuf.toString() ;

int start = strAll.indexOf(strStart) ;
int end = strAll.indexOf(strEnd) ;

String result = strAll.substring(start+31,end) ;
return result ;
}
public String drawCh(String str){
StringBuffer strBuf = new StringBuffer() ;
String regex="([\u4e00-\u9fa5]+)";
Matcher matcher = Pattern.compile(regex).matcher(str);
if(matcher.find()){
str = strBuf.append(matcher.group(0)).toString() ;
}
return str ;
}
}

待会传上改装成的android小程序,可以手机号查询和身份证查询。

❸ 什么网站可以提供数字货币行情API

Bitoffer好像也可以

❹ 现在有查看数字货币行情的小程序吗

刚在小程序栏里找了一个,搜索"币看台",功能还可以。

它有以下功能

  1. 查看数千种数字货币的实时行情
  2. 查看单一货币的24小时走势

  3. 自选自己关注的数字货币

  4. 删除不感兴趣的数字货币

截图如下:

给你哟,希望可以帮助你!!!

❺ 用什么软件查看各大交易平台的,数字货币价格

不要操作数字货币,有很多人操作都被骗了,开始老师带单操作让你你可以赚点钱,最后突然一个暴跌你就爆仓,然后又叫你加仓说你资金太少,就算你赚钱了也不能提现,因为你的账户被后台操作了,GOKEX EX就是怎样的软件,

❻ 数字货币历史数据除了交易所获取还有什么方法比较方便较长时间获取

一些数字货币数据服务商一般都有统一接口获取历史数据的,国内的有Matrix data,预测者之类的,数据各有千秋,个人感觉Matrix data更好,预测者个人的还有挺大进步空间。

❼ 请问怎样用Java获取股票行情历史数据新浪、搜狐、百度财经都可以......

publicclassStockConnection{
publicstaticvoidmain(String[]args){
URLur=null;
try{
//搜狐股票行情历史接口
// ur=newURL("http://q.stock.sohu.com/hisHq?code=cn_300228&start=20130930&end=20131231&stat=1&order=D&period=d&callback=historySearchHandler&rt=jsonp");
//新浪股票行情历史接口
ur=newURL("http://biz.finance.sina.com.cn/stock/flash_hq/kline_data.php?&rand=random(10000)&symbol=sh600000&end_date=20150809&begin_date=20000101&type=plain");
HttpURLConnectionuc=(HttpURLConnection)ur.openConnection();
BufferedReaderreader=newBufferedReader(newInputStreamReader(ur.openStream(),"GBK"));
Stringline;
while((line=reader.readLine())!=null){
System.out.println(line);
}
}catch(Exceptione){
//TODOAuto-generatedcatchblock
e.printStackTrace();
}
}
}

❽ 现在有查看数字货币行情的小程序嘛

币备神器就是啊,微信小程序里搜就能看到了

❾ java 如何实现 获取实时股票数据

一般有三种方式:

  1. 网页爬虫。采用爬虫去爬取目标网页的股票数据,去GitHub或技术论坛(如CSDN、51CTO)上找一下别人写的爬虫集成到项目中。

  2. 请求第三方API。会有专门的公司(例如网络API市场)提供股票数据,你只需要去购买他们的服务,使用他们提供的SDK,仿照demo开发实现即可。如下图所示:

❿ 数字货币行情价格走势怎么查询

8.22数字货币年度行情多空情况 后期盘面走势如何因对操作?时光荏苒,一年的时间过去一半现在咱们来回顾今年2019的比特币行情走势,经过去年的熊市让比特币走势一直处于低谷最低跌到3155的位置,之后再开年的第一天来了一次涨势就进入的震荡蓄力的状态,一直到4月1日的早间8点左右行情才迎来曙光在4000的位置起涨期间经历由5月份的9000高点,到6月的13970制高点,这一段时间的走势让很多在去年被套高位的朋友出局或者低点进场朋友得到利润,之后6月份的行情过后整体比特币走势进入回调状态,消化这段时间涨势带来的后遗症(放量),波动的区间处于9000-10000之内波动用时将近两个月,在7月底21号开始新的一轮拉升上方触及12500关口之后目前处于回调的状态,那么后期的盘面整体方向如何看待呢?虽然近两天的行情处于回调修复状态,但是整体的行情趋势多头并没有走完而是隐藏下来,从周盘就能看出多头的涨势空间还没有完全出来,而是在等待一次行情底部开始新的一轮攀升,周盘布林带指标全部以上扬为主,而这周的行情可以看出涨势与回调各占一半,且多头涨势量能的推挤并有大幅跌势出现这本就是一个信号,那么多头能否持续最为关键的就是下周盘面指标的更新情况,如下周盘面多头动能并没有进场那么将会变盘,趋势请理性看待当前晚间日线盘面空头逐渐强势,行情上方MA5与MA10日线指标有死叉迹象下行,那么只要MA10日线改平移下行那么短期还会有一次跌势出现,虽然下方11400-11200为日线短期支撑但是只要上方空头跌势触及下方这几百点根本守不住,那时11000才是分水岭,那么需要关注的点位11800-11700短期压力区间。4小时盘面由近期跌势触底11400关口而处于反弹的阶段,目前短期行情上方的压力11700如这次反弹动能不触及上方这个关口而下方MA5均线还持续下行的话那么空头才会持续,这是晚间盯盘的朋友需要注意的地方



操作思路以行情反弹至上方11700-11800压力区间不破,那么进场空单下看目标点位11500-11400区间,能持续空头单边情况下11000-11200短期可看做底部,多头短期的变盘需要关注上方压力11700位置,行情涨势破位且站稳那么可以进场多单试探上方点位11800-11900,整体的思路先以空头为主多头辅助进行如有操作的朋友带好止损止盈做好风控,前期不懂行情分析或者看不懂的朋友请谨慎进场,每一次的操作希望你们都能把最坏的结果计划好,毕竟都是真金白银,自己的辛苦钱,对得起自己付出换回来的回报最好,当然有朋友需要跟上智华操作可以联系,后期会一一通过

热点内容
收到假eth币 发布:2025-10-20 08:58:16 浏览:973
暗黑破坏神2eth打孔 发布:2025-10-20 08:42:58 浏览:105
BTC和CBT是一样的吗 发布:2025-10-20 08:42:57 浏览:233
华硕trx40Pro供电 发布:2025-10-20 08:33:26 浏览:432
晒人民币编号的朋友圈 发布:2025-10-20 08:25:32 浏览:687
doge格式 发布:2025-10-20 08:02:00 浏览:382
以太坊会爆发吗 发布:2025-10-20 08:01:59 浏览:772
一台比特币矿机的功率 发布:2025-10-20 07:39:24 浏览:925
trx辅助带 发布:2025-10-20 07:35:29 浏览:48
比特币哈希值有多少位 发布:2025-10-20 07:31:20 浏览:633