- 浏览: 361991 次
- 性别:
- 来自: 四川
文章分类
- 全部博客 (247)
- 数据库以及sql (11)
- java (48)
- 爬虫学习 (20)
- java编程 (28)
- python编程以及安装和配置 (27)
- oracle数据库 (32)
- mongodb基本操作 (4)
- linux学习 (7)
- easyUI (2)
- nodeJs (8)
- python学习 (16)
- 其他 (13)
- hadoop (1)
- svn (1)
- 汉字 (1)
- windows (2)
- jsp (5)
- fiddler (1)
- ETL (1)
- teamviewer (1)
- maven (4)
- GIT (2)
- datagrip (1)
- ocr (1)
- redis (3)
- mysql (3)
- linux (1)
- 数据服务 (0)
最新评论
package com.teamdev.jxbrowser.chromium.demo.tujia;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.X509TrustManager;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.jsoup.Jsoup;
import org.jsoup.helper.HttpConnection;
import org.jsoup.select.Elements;
public class GetTujiaHtml {
public static String testPost(String urlStr,String param,String id) {
try {
URL url = new URL(urlStr);
URLConnection con1 = url.openConnection();
HttpURLConnection con = (HttpURLConnection)con1;
// 发送POST请求必须设置如下两行
con.setDoOutput(true);
con.setDoInput(true);
con.setRequestMethod("POST");
con.setRequestProperty("Accept", "application/json, text/plain, */*");
con.setRequestProperty("Accept-Encoding", "gzip, deflate, br");
con.setRequestProperty("Accept-Language", "zh-CN,zh;q=0.8");
con.setRequestProperty("Cookie", "__guid=195168682.753543604333822000.1532336993597.7224; tujia.com_PortalContext_RefUrl=https://www.tujia.com/gongyu/sanya/hp2/; tujia.com_PortalContext_LongerRefUrl=https://www.tujia.com/gongyu/sanya/hp2/; tujia.com_PortalContext_GuestToken=9ce24447-88df-4203-9a0a-d0099e9c8909; tujia.com_PortalContext_GuestId=-1002633651; tujia.com_PortalContext_LandingUrl=http://www.tujia.com/UI/Float?callback=TJPFloating.BuildHTML&PlatformType=pc; manualclose=1; tujia.com_PortalContext_UserClickKeywordRecord=; tujia.com_PortalContext_UserSessionId=e24aac71-40be-4038-a335-666d04863f58; JSESSIONID=33191E49AED12512A01F9B589BE3EE92; tujia.com_PortalContext_DestinationId=1; monitor_count=12; tujia.com_PortalContext_StartDate=2018-7-24; tujia.com_PortalContext_EndDate=2018-7-25; gr_user_id=9e67650c-c645-43b5-a92c-8f31cebad486; _ga=GA1.2.605216747.1532336995; _gid=GA1.2.557490446.1532336995; Hm_lvt_405c96e7f6bed44fb846abfe1f65c6f5=1532336995; Hm_lpvt_405c96e7f6bed44fb846abfe1f65c6f5=1532401783; accessId=797098a0-b29d-11e5-b3b1-49764155fe50; pageViewNum=11; bad_id797098a0-b29d-11e5-b3b1-49764155fe50=2b8f7bd1-8e58-11e8-a1e8-d587156eb665; nice_id797098a0-b29d-11e5-b3b1-49764155fe50=2b8f7bd2-8e58-11e8-a1e8-d587156eb665; tujia.com_PortalContext_UserId=0; gr_session_id_1fa38dc3b3e047ffa08b14193945e261=80ebee6f-ca30-4970-bd76-3ae658c0fc0e; gr_session_id_1fa38dc3b3e047ffa08b14193945e261_80ebee6f-ca30-4970-bd76-3ae658c0fc0e=false");
con.setRequestProperty("Connection", "keep-alive");
con.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
con.setRequestProperty("Host", "www.tujia.com");
con.setRequestProperty("Origin", "https://www.tujia.com");
con.setRequestProperty("Referer", "https://www.tujia.com/detail/"+id+".htm");
con.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36");
OutputStreamWriter out = new OutputStreamWriter(con
.getOutputStream());
//String xmlInfo = getXmlInfo();
//System.out.println("urlStr=" + urlStr);
//System.out.println("xmlInfo=" + xmlInfo);
//out.write("{\"getStoreInfosSearchDTO\":{\"appId\":\"b3ad5aba-ae1e-4f4b-ba55-c5fb0375de3c\",\"areaCode\":\"3-110112\",\"filter\":{\"areaCode\":\"\",\"distance\":\"\",\"govGrade\":\"\",\"marketCode\":\"\",\"restaurantType\":\"\",\"tradeAreaCode\":\"\"},\"lat\":\"39.966983795166\",\"lng\":\"116.30883026123\",\"pageIndex\":"+pageIndex+",\"pageSize\":20,\"userId\":\"a6b75273-0153-44e4-be0d-29cf006ebb22\"}}");
out.write(param);
//out.write(new String(xmlInfo.getBytes("ISO-8859-1")));
out.flush();
out.close();
BufferedReader br = new BufferedReader(new InputStreamReader(con
.getInputStream()));
String line = "";
for (line = br.readLine(); line != null; line = br.readLine()) {
//System.out.println(line);
return line;
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public static String GetSearch2(String param,String page,String id) throws Exception {
String body = "";
HttpPost httpPost = new HttpPost(
"https://www.tujia.com/bingo/pc/comment/searchUnitComments");
CloseableHttpClient client = HttpClients.createDefault();
// Map<String, String> map = new HashMap<String, String>();
// map.put("hasPic", "false");
// map.put("pageIndex", page);
// map.put("pageSize", "10");
// map.put("unitId", id);
// map.put("recommended", "false");
// // 装填参数
// List<NameValuePair> nvps = new ArrayList<NameValuePair>();
// if (map != null) {
// for (Entry<String, String> entry : map.entrySet()) {
// nvps.add(new BasicNameValuePair(entry.getKey(), entry
// .getValue()));
// }
// }
// // 设置参数到请求对象中
// httpPost.setEntity(new UrlEncodedFormEntity(nvps, "utf-8"));
// 设置header信息
// 指定报文头【Content-type】、【User-Agent】
httpPost.setHeader("Accept", "application/json, text/plain, */*");
httpPost.setHeader("Accept-Encoding", "gzip, deflate, br");
httpPost.setHeader("Accept-Language", "zh-CN,zh;q=0.8");
httpPost.setHeader("Cookie", "__guid=195168682.753543604333822000.1532336993597.7224; tujia.com_PortalContext_RefUrl=https://www.tujia.com/gongyu/sanya/hp2/; tujia.com_PortalContext_LongerRefUrl=https://www.tujia.com/gongyu/sanya/hp2/; tujia.com_PortalContext_GuestToken=9ce24447-88df-4203-9a0a-d0099e9c8909; tujia.com_PortalContext_GuestId=-1002633651; tujia.com_PortalContext_LandingUrl=http://www.tujia.com/UI/Float?callback=TJPFloating.BuildHTML&PlatformType=pc; manualclose=1; tujia.com_PortalContext_UserClickKeywordRecord=; tujia.com_PortalContext_UserSessionId=e24aac71-40be-4038-a335-666d04863f58; JSESSIONID=33191E49AED12512A01F9B589BE3EE92; tujia.com_PortalContext_DestinationId=1; monitor_count=12; tujia.com_PortalContext_StartDate=2018-7-24; tujia.com_PortalContext_EndDate=2018-7-25; gr_user_id=9e67650c-c645-43b5-a92c-8f31cebad486; _ga=GA1.2.605216747.1532336995; _gid=GA1.2.557490446.1532336995; Hm_lvt_405c96e7f6bed44fb846abfe1f65c6f5=1532336995; Hm_lpvt_405c96e7f6bed44fb846abfe1f65c6f5=1532401783; accessId=797098a0-b29d-11e5-b3b1-49764155fe50; pageViewNum=11; bad_id797098a0-b29d-11e5-b3b1-49764155fe50=2b8f7bd1-8e58-11e8-a1e8-d587156eb665; nice_id797098a0-b29d-11e5-b3b1-49764155fe50=2b8f7bd2-8e58-11e8-a1e8-d587156eb665; tujia.com_PortalContext_UserId=0; gr_session_id_1fa38dc3b3e047ffa08b14193945e261=80ebee6f-ca30-4970-bd76-3ae658c0fc0e; gr_session_id_1fa38dc3b3e047ffa08b14193945e261_80ebee6f-ca30-4970-bd76-3ae658c0fc0e=false");
httpPost.setHeader("Connection", "keep-alive");
httpPost.setHeader("Content-Type", "application/json;charset=UTF-8");
httpPost.setHeader("Host", "www.tujia.com");
httpPost.setHeader("Origin", "https://www.tujia.com");
httpPost.setHeader("Referer", "https://www.tujia.com/detail/"+id+".htm");
httpPost.setHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36");
//设置请求体
httpPost.setEntity(new StringEntity(param));
// RequestConfig requestConfig = RequestConfig.custom()
// // .setProxy(proxy)
// .setConnectTimeout(10000).setSocketTimeout(10000)
// .setConnectionRequestTimeout(3000).build();
// // httpPost.setConfig(requestConfig);
// 执行请求操作,并拿到结果(同步阻塞)
CloseableHttpResponse response = client.execute(httpPost);
// 获取结果实体
HttpEntity entity = response.getEntity();
if (entity != null) {
// 按指定编码转换结果实体为String类型
body = EntityUtils.toString(entity, "UTF-8");
}
EntityUtils.consume(entity);
// 释放链接
response.close();
System.out.println(body);
//Document doc = Jsoup.parse(body);
return body;
}
public static void main(String[] args) {
try {
String id ="17825";
String param="{\"hasPic\": false, \"pageIndex\": 2, \"pageSize\": 10, \"unitId\": \"17825\",\"recommended\": false}";
String html =GetSearch2("https://www.tujia.com/bingo/pc/comment/searchUnitComments",param,id);
System.out.println(html);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.X509TrustManager;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.jsoup.Jsoup;
import org.jsoup.helper.HttpConnection;
import org.jsoup.select.Elements;
public class GetTujiaHtml {
public static String testPost(String urlStr,String param,String id) {
try {
URL url = new URL(urlStr);
URLConnection con1 = url.openConnection();
HttpURLConnection con = (HttpURLConnection)con1;
// 发送POST请求必须设置如下两行
con.setDoOutput(true);
con.setDoInput(true);
con.setRequestMethod("POST");
con.setRequestProperty("Accept", "application/json, text/plain, */*");
con.setRequestProperty("Accept-Encoding", "gzip, deflate, br");
con.setRequestProperty("Accept-Language", "zh-CN,zh;q=0.8");
con.setRequestProperty("Cookie", "__guid=195168682.753543604333822000.1532336993597.7224; tujia.com_PortalContext_RefUrl=https://www.tujia.com/gongyu/sanya/hp2/; tujia.com_PortalContext_LongerRefUrl=https://www.tujia.com/gongyu/sanya/hp2/; tujia.com_PortalContext_GuestToken=9ce24447-88df-4203-9a0a-d0099e9c8909; tujia.com_PortalContext_GuestId=-1002633651; tujia.com_PortalContext_LandingUrl=http://www.tujia.com/UI/Float?callback=TJPFloating.BuildHTML&PlatformType=pc; manualclose=1; tujia.com_PortalContext_UserClickKeywordRecord=; tujia.com_PortalContext_UserSessionId=e24aac71-40be-4038-a335-666d04863f58; JSESSIONID=33191E49AED12512A01F9B589BE3EE92; tujia.com_PortalContext_DestinationId=1; monitor_count=12; tujia.com_PortalContext_StartDate=2018-7-24; tujia.com_PortalContext_EndDate=2018-7-25; gr_user_id=9e67650c-c645-43b5-a92c-8f31cebad486; _ga=GA1.2.605216747.1532336995; _gid=GA1.2.557490446.1532336995; Hm_lvt_405c96e7f6bed44fb846abfe1f65c6f5=1532336995; Hm_lpvt_405c96e7f6bed44fb846abfe1f65c6f5=1532401783; accessId=797098a0-b29d-11e5-b3b1-49764155fe50; pageViewNum=11; bad_id797098a0-b29d-11e5-b3b1-49764155fe50=2b8f7bd1-8e58-11e8-a1e8-d587156eb665; nice_id797098a0-b29d-11e5-b3b1-49764155fe50=2b8f7bd2-8e58-11e8-a1e8-d587156eb665; tujia.com_PortalContext_UserId=0; gr_session_id_1fa38dc3b3e047ffa08b14193945e261=80ebee6f-ca30-4970-bd76-3ae658c0fc0e; gr_session_id_1fa38dc3b3e047ffa08b14193945e261_80ebee6f-ca30-4970-bd76-3ae658c0fc0e=false");
con.setRequestProperty("Connection", "keep-alive");
con.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
con.setRequestProperty("Host", "www.tujia.com");
con.setRequestProperty("Origin", "https://www.tujia.com");
con.setRequestProperty("Referer", "https://www.tujia.com/detail/"+id+".htm");
con.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36");
OutputStreamWriter out = new OutputStreamWriter(con
.getOutputStream());
//String xmlInfo = getXmlInfo();
//System.out.println("urlStr=" + urlStr);
//System.out.println("xmlInfo=" + xmlInfo);
//out.write("{\"getStoreInfosSearchDTO\":{\"appId\":\"b3ad5aba-ae1e-4f4b-ba55-c5fb0375de3c\",\"areaCode\":\"3-110112\",\"filter\":{\"areaCode\":\"\",\"distance\":\"\",\"govGrade\":\"\",\"marketCode\":\"\",\"restaurantType\":\"\",\"tradeAreaCode\":\"\"},\"lat\":\"39.966983795166\",\"lng\":\"116.30883026123\",\"pageIndex\":"+pageIndex+",\"pageSize\":20,\"userId\":\"a6b75273-0153-44e4-be0d-29cf006ebb22\"}}");
out.write(param);
//out.write(new String(xmlInfo.getBytes("ISO-8859-1")));
out.flush();
out.close();
BufferedReader br = new BufferedReader(new InputStreamReader(con
.getInputStream()));
String line = "";
for (line = br.readLine(); line != null; line = br.readLine()) {
//System.out.println(line);
return line;
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public static String GetSearch2(String param,String page,String id) throws Exception {
String body = "";
HttpPost httpPost = new HttpPost(
"https://www.tujia.com/bingo/pc/comment/searchUnitComments");
CloseableHttpClient client = HttpClients.createDefault();
// Map<String, String> map = new HashMap<String, String>();
// map.put("hasPic", "false");
// map.put("pageIndex", page);
// map.put("pageSize", "10");
// map.put("unitId", id);
// map.put("recommended", "false");
// // 装填参数
// List<NameValuePair> nvps = new ArrayList<NameValuePair>();
// if (map != null) {
// for (Entry<String, String> entry : map.entrySet()) {
// nvps.add(new BasicNameValuePair(entry.getKey(), entry
// .getValue()));
// }
// }
// // 设置参数到请求对象中
// httpPost.setEntity(new UrlEncodedFormEntity(nvps, "utf-8"));
// 设置header信息
// 指定报文头【Content-type】、【User-Agent】
httpPost.setHeader("Accept", "application/json, text/plain, */*");
httpPost.setHeader("Accept-Encoding", "gzip, deflate, br");
httpPost.setHeader("Accept-Language", "zh-CN,zh;q=0.8");
httpPost.setHeader("Cookie", "__guid=195168682.753543604333822000.1532336993597.7224; tujia.com_PortalContext_RefUrl=https://www.tujia.com/gongyu/sanya/hp2/; tujia.com_PortalContext_LongerRefUrl=https://www.tujia.com/gongyu/sanya/hp2/; tujia.com_PortalContext_GuestToken=9ce24447-88df-4203-9a0a-d0099e9c8909; tujia.com_PortalContext_GuestId=-1002633651; tujia.com_PortalContext_LandingUrl=http://www.tujia.com/UI/Float?callback=TJPFloating.BuildHTML&PlatformType=pc; manualclose=1; tujia.com_PortalContext_UserClickKeywordRecord=; tujia.com_PortalContext_UserSessionId=e24aac71-40be-4038-a335-666d04863f58; JSESSIONID=33191E49AED12512A01F9B589BE3EE92; tujia.com_PortalContext_DestinationId=1; monitor_count=12; tujia.com_PortalContext_StartDate=2018-7-24; tujia.com_PortalContext_EndDate=2018-7-25; gr_user_id=9e67650c-c645-43b5-a92c-8f31cebad486; _ga=GA1.2.605216747.1532336995; _gid=GA1.2.557490446.1532336995; Hm_lvt_405c96e7f6bed44fb846abfe1f65c6f5=1532336995; Hm_lpvt_405c96e7f6bed44fb846abfe1f65c6f5=1532401783; accessId=797098a0-b29d-11e5-b3b1-49764155fe50; pageViewNum=11; bad_id797098a0-b29d-11e5-b3b1-49764155fe50=2b8f7bd1-8e58-11e8-a1e8-d587156eb665; nice_id797098a0-b29d-11e5-b3b1-49764155fe50=2b8f7bd2-8e58-11e8-a1e8-d587156eb665; tujia.com_PortalContext_UserId=0; gr_session_id_1fa38dc3b3e047ffa08b14193945e261=80ebee6f-ca30-4970-bd76-3ae658c0fc0e; gr_session_id_1fa38dc3b3e047ffa08b14193945e261_80ebee6f-ca30-4970-bd76-3ae658c0fc0e=false");
httpPost.setHeader("Connection", "keep-alive");
httpPost.setHeader("Content-Type", "application/json;charset=UTF-8");
httpPost.setHeader("Host", "www.tujia.com");
httpPost.setHeader("Origin", "https://www.tujia.com");
httpPost.setHeader("Referer", "https://www.tujia.com/detail/"+id+".htm");
httpPost.setHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36");
//设置请求体
httpPost.setEntity(new StringEntity(param));
// RequestConfig requestConfig = RequestConfig.custom()
// // .setProxy(proxy)
// .setConnectTimeout(10000).setSocketTimeout(10000)
// .setConnectionRequestTimeout(3000).build();
// // httpPost.setConfig(requestConfig);
// 执行请求操作,并拿到结果(同步阻塞)
CloseableHttpResponse response = client.execute(httpPost);
// 获取结果实体
HttpEntity entity = response.getEntity();
if (entity != null) {
// 按指定编码转换结果实体为String类型
body = EntityUtils.toString(entity, "UTF-8");
}
EntityUtils.consume(entity);
// 释放链接
response.close();
System.out.println(body);
//Document doc = Jsoup.parse(body);
return body;
}
public static void main(String[] args) {
try {
String id ="17825";
String param="{\"hasPic\": false, \"pageIndex\": 2, \"pageSize\": 10, \"unitId\": \"17825\",\"recommended\": false}";
String html =GetSearch2("https://www.tujia.com/bingo/pc/comment/searchUnitComments",param,id);
System.out.println(html);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
发表评论
-
采集ymx商品信息
2018-08-29 15:28 497public static void main(String[ ... -
根据百度加密url, 获取真实url
2018-08-06 10:46 0public static void main(String[ ... -
fiddler 抓取 手机https 数据包 完美解决
2018-08-03 12:43 3005转:https://jingyan.baidu.com ... -
无忧代理IP
2018-07-30 16:19 0http://api.ip.data5u.com/dynami ... -
无所不能的四种请求方式(天下武功为怪不破)
2018-07-26 11:50 829package com.teamdev.jxbrowser.c ... -
post请求加json参数或xml参数
2018-07-20 18:21 1243import java.io.BufferedReader; ... -
jd编号
2017-11-02 17:59 493京东店铺:https://mall.jd.com/index- ... -
清除google缓存
2017-10-26 11:20 6171.进入 chrome://net-internals/#dn ... -
adb server is out of date. killing... 本地连接夜神模拟器失败、超时
2017-06-19 10:43 1490原因:1.模拟器器设置了代理;2.主要是模拟器和sdk 的ad ... -
fiddler抓取的https请求 数据乱码问题解决方案
2017-06-09 09:44 7186参考地址:http://blog.csdn.net/SomeO ... -
chromium.Browser 禁止加载图片,提升加载速度
2017-05-25 11:29 1161package com.teamdev.jxbrowser.c ... -
chrome 禁止加载网页图片 解决办法
2017-05-25 11:18 23171.在谷歌浏览器中输入:chrome://settings/c ... -
开源爬虫框架的优缺点?
2017-03-22 14:46 787开源爬虫框架各有什么优缺点? 作者:老夏 开发网络爬 ... -
反爬虫
2017-03-17 10:34 6641. 伪装user agent User agen ... -
爬虫被封禁原因
2017-03-17 09:37 1503爬虫被封禁常见原因 1. ... -
App数据抓取
2017-03-17 09:32 1052思路: 通过fiddler抓包 ... -
八爪鱼规则学习
2017-03-08 13:44 8131.八爪鱼采集器是任何一个需要从网页获取信息的人都必备的采集工 ... -
java模拟jquery请求动作(模拟点击、选择下拉)
2016-12-29 14:40 4020package com.teamdev.jxbrowser.c ... -
httpclient
2016-11-01 16:37 732package com.teamdev.jxbrowser.c ... -
jsoup + json 解析网页
2016-11-01 16:25 1261package com.teamdev.jxbrowser.c ...
相关推荐
最近在工作中,由于合作商只提供uRL,我这边需要通过HTTP请求Get或Post方式请求Json数据,然后解析JSON格式,解析json我使用的第三方库rapidjson。开发环境是64位win7,VS2015。
java 通过发送json,post请求,返回json数据的方法 java 通过发送json,post请求,返回json数据的方法
Unity 中通过UnityWebRequest 以POST形式传JSON格式(键值对格式)的参数请求数据。
java代码发送JSON格式的httpPOST请求
Qt post请求发送和解析json数据完整示例,有完整的设置框架,可以发送和解析多个post请求
新建qt工程,利用编译好的curl库,发送post请求,发送的是json格式,返回json格式,刚开始接触curl的人可以参考。
通常前端通过POST请求向服务器端提交数据格式有4中,分别是”application/x-www-form-urlencoded”格式、” multipart/form-data”格式、”application/json”格式和”text/xml”格式。通常最常见的是”application/...
下面小编就为大家分享一篇Android中post请求传递json数据给服务端的实例,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
Qt 实现的http请求,采用POST 方式 ,上传json数据内容的个人测试工具,支持中文转UTF-8的接口
NULL 博文链接:https://cxl2012.iteye.com/blog/2210521
Power Builder 12.5,使用ole MSXML2.ServerXMLHTTP方式,对接WEB API,以JSON方式提交数据,POST/GET方式均可。
qt工程中引入编译好的curl库,封装了一个类来执行post请求 可以直接拿来改造。 数据格式为json格式
C++通过HTTP请求Get或Post方式请求Json数据
原生asp.net不支持通过json提交 方式给控制器的Action传参数,本程序通过给自定义输入字符串格式方法。在action的传参上加入FromJsonKey属性即可在传入的json中传入参数,如果传入的json中不存在相应键即报错 ...
kettle抽取http请求,发送json参数示例
python3代码,包含了处理post请求爬取网页数据代码,注释部分包括对json数据的处理。如果有疑问,随时扣me *-*
java发送JSON格式的http通讯的post请求
C#中通过直接添加引用的方来调用Web Service的方式不够灵活,故采取手动发送Http请求的方式来调用Web Service。最后选择使用Post方式来调用Web Service
利用c# httpclient ,post json数据到web api
HTTP Post提交与接收Json Winform程序,实现Json的提交和接收