NO NAME - NF 百度网盘下载助手

NF - No Name ( 2017 )
1,085 views
NF - No Name ( 2017 )
NEW TRACKS THAT YOU MAY LIKE...
LATEST VIDEOS
MZ NEWSLETTER
STAY TUNED!
Get updates of the newest and the hottest music by signing up:
LAST UPDATES
MUSIC VIDEOS
SPECIAL UPDATES
CONTACT US
To contact us simply fill the form below:
Feedback / Suggestions / Help
Submissions (Songs, Videos)
Advertising
Copyright Infringement / Abuse
Copyright ?
MzHipHop All Rights Reserved.公告:希望大家能多多将迅影网分享给自己的亲朋好友,多谢!
之后-高清迅雷下载
(戛纳电影节)
其后 / Geu-Hu / The Day After / Le Jour d’après
  已婚男奉完(权海骁 饰)与在出版社工作的女人相爱,但最近两人分开了,他感到十分痛苦。这一天,奉完也像平时一样在夜色深沉的凌晨出了家门,到出版社去工作。但妻子发现了他的恋爱信件,追到了出版社。恰好雅凛(金敏喜 饰)到了出版社工作,奉完的妻子错以为雅凛就是那位与老公交往的女人。
播放链接:
0人想看 / 0人看过 / 0人喜欢
欢迎访问迅影网
您可以在迅影网 免费下载 和 在线观看 最新电影哦。
把迅影网加入到收藏夹(快捷键:ctrl+D),免得下次找不到哦。
不推荐使用低版本的IE浏览器访问,建议你装个谷歌、火狐,或360、百度等浏览器。
更多精彩内容等你发现。报告错误,请发邮件至:如何获取百度网盘下载真实地址
这是一个java写的获取百度网盘真实下载链接进行下载的程序。
程序里面一些参数拼接是根据抓包来的。具体的抓包方法网上一大堆,可以参考。这里给出了和导出的jar包。
url网址使用于百度分享的地址。暂时没有适配有提取码的地址。
运行的方法:
1、在当前的目录打开cmd,默认不带参数就是用默认的测试的url。
java -jar BaiduPanURL.jar
2、如果想使用自己定义的资源地址可以在后面加一个参数。
java -jar BaiduPanURL.jar your_url
注意:百度网盘同一个ip进行3次下载之后就需要验证码。程序会在当前的目录生成验证码,输入正确的验证码后可以进行下载。
本人亲测有效,百度会限制下载的速率,测试只有100kb左右。
程序源码:
1、GetBaiduCloudRealURL:
package com.example.
import java.io.BufferedR
import java.io.IOE
import java.io.InputStreamR
import java.util.HashM
import java.util.M
import java.util.regex.M
import java.util.regex.P
import com.example.bean.Response20;
import com.example.bean.SetDataB
import com.google.gson.G
* 输入百度网盘的资源地址,获取网盘的真实下载地址。
* @author gaoqiang
public class GetBaiduCloudRealURL {
// 定义一些全局变量
private static String url = &https://pan.baidu.com/s/1eQrwbKY&;// 资源地址
private static String cookie =
private static final String getodeURL = &https://pan.baidu.com/api/getvcode?prod=pan&;// 请求vcode地址,不变
private static boolean isDownload =//标记是否需要下载文件,false就只获取地址
private static String server_filename =
private static String size =
// 通过浏览器抓包分析,获取百度网盘共享文件的真实下载地址
public static void main(String[] args) {
if (args.length & 0) {
System.out.println(&输入的原始地址:& + args[0]);
url = args[0];
// 第一次获取cookie()
Map map1 = HttpUtils.get(url, cookie);
System.out.println(&服务器返回的cookie:\n& + map1.get(&cookie&) + &\n&);
cookie = &PANWEB=1;& + map1.get(&cookie&).split(&;&)[0];// 抓包看到携带了PANWEB1,不设置也没问题
Map params = getBodyParams(map1.get(&body&));
server_filename = params.get(&server_filename&);
size = params.get(&size&);
// 拼接post的url地址
String post_url = getPostUrl(params);
// 拼接post携带的参数
Map data = getPostData(params);
// 发送post请求
String responseJson = HttpUtils.post(post_url, data, cookie);
System.out.println(responseJson + &\n&);
Gson gson = new Gson();
Response20 response20 = gson.fromJson(responseJson, Response20.class);
String errorCode = response20.getErrno();
int count = 0;
while (!errorCode.equals(&0&) && count & 5) {
if (errorCode.equals(&-20&)) {
// 下载超过3次,需要验证码,获取vcode和img地址
Map generateValidateCode = generateValidateCode(count);
data.put(&vcode_input&, generateValidateCode.get(&vcode_input&));
data.put(&vcode_str&, generateValidateCode.get(&vcode_str&));
String responseJsonCode = HttpUtils.post(post_url, data, cookie);
System.out.println(responseJsonCode + &\n&);
errorCode = gson.fromJson(responseJsonCode, Response20.class).getErrno();
if (errorCode.equals(&0&)) {
responseJson = responseJsonC
if (errorCode.equals(&0&)) {// 成功返回真实的url
String realURL = parseRealDownloadURL(responseJson);
System.out.println(&成功!真实的下载链接为:& + realURL);
if (isDownload) {
System.out.println(&正在下载文件...&);
HttpUtils.download(realURL, cookie, server_filename, size);// 进行下载
System.out.println(&配置不下载&);
System.out.println(&尝试了& + count + &次,地址获取失败&);
* POST请求的url地址
public static String getPostUrl(Map params) {
* post请求(抓包可看到) 抓包看到logid,实际测试logid不携带也可以正常抓取
* https://pan.baidu.com/api/
* sharedownload?sign=2d970cdeb09d423d549dea2f4ef28da
* &bdstoken=null&channel=chunlei&clienttype=0&web=1
* &app_id=250528&logid=MTUxNTQwMDQ1NTc1MTAuOTYwMTE4NzIyMzcxMzYwNQ==
StringBuffer sb1 = new StringBuffer();
sb1.append(&https://pan.baidu.com/api/sharedownload?&);
sb1.append(&sign=& + params.get(&sign&));
sb1.append(&&tamp=& + params.get(&timestamp&));
sb1.append(&&bdstoken=& + params.get(&bdstoken&));
sb1.append(&&channel=chunlei&);
sb1.append(&&clienttype=0&);
sb1.append(&&web=1&);
sb1.append(&&app_id=& + params.get(&app_id&));
String post_url = sb1.toString();
System.out.println(&POST请求的网址:& + post_url);
return post_
* 获取POST请求携带的参数
public static Map getPostData(Map params) {
// POST携带的参数(抓包可看到)
Map data = new HashMap();
data.put(&encrypt&, &0&);
data.put(&product&, &share&);
data.put(&uk&, params.get(&uk&));
data.put(&primaryid&, params.get(&primaryid&));
// 添加了[],解码就是%5B %5D
data.put(&fid_list&, &%5B& + params.get(&fid_list&) + &%5D&);
data.put(&path_list&, &&);// 可以不写
* 从post返回数据解析出dlink字段,真实的下载地址,这个地址有效期8h
public static String parseRealDownloadURL(String responseJson) {
String realURL = &&;
Pattern pattern = Pattern.compile(&\&dlink\&:.*?,&);
Matcher matcher = pattern.matcher(responseJson);
if (matcher.find()) {
String tmp = matcher.group(0);
String dlink = tmp.substring(9, tmp.length() - 2);
realURL = dlink.replaceAll(&\\\\&, &&);
return realURL;
* 获取并输入验证码
* @return map{vcode_str:请求的vcode值, vcode_input:输入的验证码}
public static Map generateValidateCode(int count) {
// 下载超过3次,需要验证码,获取vcode和img地址
Map vcodeResponse = HttpUtils.get(getvcodeURL, cookie);
String res = vcodeResponse.get(&body&);
System.out.println(&获取vcode:& + vcodeResponse.get(&body&));
Gson gsonVcode = new Gson();
Response20 responseVcode = gsonVcode.fromJson(res, Response20.class);
String vcode = responseVcode.getVcode();
String imgURL = responseVcode.getImg();
System.out.println(&vcode值:& + vcode);
System.out.println(&验证码地址:& + imgURL);
// 请求验证码
HttpUtils.saveImage(imgURL, cookie);
System.out.print(&查看图片,输入验证码(第& + count + &次尝试/共5次):&);
InputStreamReader is_reader = new InputStreamReader(System.in);
Map map = new HashMap();
String result = new BufferedReader(is_reader).readLine();
System.out.println(&输入的验证码为:& + result + &\n&);
map.put(&vcode_str&, vcode);
map.put(&vcode_input&, result);
} catch (IOException e) {
e.printStackTrace();
* 正则匹配出json字符串,将json字符串转化为java对象。
public static Map getBodyParams(String body) {
Map map = new HashMap();
String setData = &&;
Pattern pattern_setData = Pattern.compile(&setData.*?;&);
Matcher matcher_setData = pattern_setData.matcher(body);
if (matcher_setData.find()) {
String tmp = matcher_setData.group(0);
setData = tmp.substring(8, tmp.length() - 2);
// System.out.println(&setData:& + setData + &\n&);
Gson gson = new Gson();
SetDataBean bean = gson.fromJson(setData, SetDataBean.class);
System.out.println(&sign--& + bean.getSign());
System.out.println(&token--& + bean.getBdstoken());
System.out.println(&timestamp--& + bean.getTimestamp());
System.out.println(&uk--& + bean.getUk());
System.out.println(&shareid--& + bean.getShareid());
System.out.println(&fs_id--& + bean.getFile_list().getList()[0].getFs_id());
System.out.println(&file_name--& + bean.getFile_list().getList()[0].getServer_filename());
System.out.println(&size--& + bean.getFile_list().getList()[0].getSize());
System.out.println(&app_id--& + bean.getFile_list().getList()[0].getApp_id() + &\n&);
map.put(&sign&, bean.getSign());
map.put(&timestamp&, bean.getTimestamp());
map.put(&bdstoken&, bean.getBdstoken());
map.put(&app_id&, bean.getFile_list().getList()[0].getApp_id());
map.put(&uk&, bean.getUk());
map.put(&shareid&, bean.getShareid());
map.put(&primaryid&, bean.getShareid());
map.put(&fs_id&, bean.getFile_list().getList()[0].getFs_id());
map.put(&fid_list&, bean.getFile_list().getList()[0].getFs_id());
map.put(&server_filename&, bean.getFile_list().getList()[0].getServer_filename());
map.put(&size&, bean.getFile_list().getList()[0].getSize());
2、HttpUtils:
package com.example.
import java.io.BufferedR
import java.io.FileOutputS
import java.io.IOE
import java.io.InputS
import java.io.InputStreamR
import java.io.OutputStreamW
import java.net.HttpURLC
import java.net.URL;
import java.net.URLC
import java.util.HashM
import java.util.M
public class HttpUtils {
* 向指定URL发送GET方法的请求 返回cookie,body等
* 会返回流里面的内容,如果下载大文件,需要修改,实时保存,避免内存溢出
public static Map get(String url, String cookie) {
BufferedReader in =
Map map = new HashMap();
URL realUrl = new URL(url);
// 打开和URL之间的连接
URLConnection connection = realUrl.openConnection();
// 设置通用的请求属性
connection.setRequestProperty(&accept&, &*/*&);
connection.setRequestProperty(&connection&, &Keep-Alive&);
connection.setRequestProperty(&user-agent&, &Mozilla/4.0 ( MSIE 6.0; Windows NT 5.1;SV1)&);
connection.setConnectTimeout(5000);
connection.setReadTimeout(5000);
if (null != cookie) {
//System.out.println(&携带的Cookie:& + cookie);
connection.setRequestProperty(&Cookie&, cookie);
// 建立实际的连接
connection.connect();
// 定义 BufferedReader输入流来读取URL的响应
in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
StringBuffer sb = new StringBuffer();
while ((line = in.readLine()) != null) {
sb.append(line + &\n&);
//System.out.println(&内容:& + line);
String c = connection.getHeaderField(&Set-Cookie&);
map.put(&cookie&, c);
map.put(&body&, sb.toString());
} catch (Exception e) {
System.err.println(e.getMessage());
} finally {
if (in != null) {
in.close();
} catch (Exception e2) {
e2.printStackTrace();
* 保存验证码
public static Map saveImage(String url, String cookie) {
Map map = new HashMap();
InputStream in =
FileOutputStream fos =
URL realUrl = new URL(url);
// 打开和URL之间的连接
URLConnection connection = realUrl.openConnection();
// 设置通用的请求属性
connection.setRequestProperty(&accept&, &*/*&);
connection.setRequestProperty(&connection&, &Keep-Alive&);
connection.setRequestProperty(&user-agent&, &Mozilla/4.0 ( MSIE 6.0; Windows NT 5.1;SV1)&);
connection.setConnectTimeout(5000);
connection.setReadTimeout(5000);
if (null != cookie) {
connection.setRequestProperty(&Cookie&, cookie);
// 建立实际的连接
connection.connect();
in = connection.getInputStream();
fos = new FileOutputStream(&img.jpeg&);
while((b= in.read())!=-1){
fos.write(b);
} catch (Exception e) {
System.err.println(e.getMessage());
} finally {
if (in != null) {
in.close();
if(fos != null){
fos.close();
} catch (Exception e2) {
e2.printStackTrace();
static int downloadSize = 0;
static boolean isReading =//是否在读流,更新进度
static long startTime = 0 ;
static long endTime = 0 ;
* 下载文件
public static Map download(String url, String cookie, String filename, final String totalSize) {
InputStream in =
FileOutputStream fos =
Map map = new HashMap();
URL realUrl = new URL(url);
// 打开和URL之间的连接
URLConnection connection = realUrl.openConnection();
// 设置通用的请求属性
connection.setRequestProperty(&accept&, &*/*&);
connection.setRequestProperty(&connection&, &Keep-Alive&);
connection.setRequestProperty(&user-agent&, &Mozilla/4.0 ( MSIE 6.0; Windows NT 5.1;SV1)&);
connection.setConnectTimeout(10000);
connection.setReadTimeout(5000);
if (null != cookie) {
connection.setRequestProperty(&Cookie&, cookie);
// 建立实际的连接
connection.connect();
in = connection.getInputStream();
fos = new FileOutputStream(filename);
System.out.println(&保存文件名称:& + filename);
System.out.println(&文件总大小:& + totalSize);
//利用字符数组读取流数据
startTime = System.currentTimeMillis();
//每隔1s读一次数据
new Thread(){
public void run() {
String total = UnitSwitch.formatSize(Long.parseLong(totalSize));
StringBuffer sb = new StringBuffer();
for (int i = 0; i & 20; i++) {
sb.append(&\b&);
while(isReading){
endTime = System.currentTimeMillis();
String speed = UnitSwitch.calculateSpeed(downloadSize, endTime-startTime);
System.out.println(UnitSwitch.formatSize(downloadSize) + &/& + total + &,平均下载速率:& + speed);
sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}.start();
isReading =
byte[] arr = new byte[1024 * 8];
while((len = in.read(arr)) != -1) {
fos.write(arr, 0, len);
downloadSize +=
endTime = System.currentTimeMillis();
String speed = UnitSwitch.calculateSpeed(downloadSize, endTime-startTime);
String total = UnitSwitch.formatSize(Long.parseLong(totalSize));
System.out.println(UnitSwitch.formatSize(downloadSize) + &/& + total + &,平均下载速率:& + speed);
System.out.println(&下载完成,总耗时:& + (endTime - startTime)/1000 + &秒&);
} catch (Exception e) {
System.err.println(e.getMessage());
} finally {
isReading =
if (in != null) {
in.close();
if(fos != null){
fos.close();
} catch (Exception e2) {
e2.printStackTrace();
* 发送HttpPost请求
* @param strURL
* @param params
* @return 成功:返回json字符串
public static String post(String strURL, Map params, String cookie) {
URL url = new URL(strURL);// 创建连接
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setUseCaches(false);
connection.setInstanceFollowRedirects(true);
connection.setRequestMethod(&POST&); // 设置请求方式
connection.setRequestProperty(&Accept&, &*/*&); // 设置接收数据的格式
connection.setRequestProperty(&Content-Type&, &application/x-www-form- charset=UTF-8&); // 设置发送数据的格式
if (null != cookie) {
System.out.println(&携带的Cookie:& + cookie);
connection.setRequestProperty(&Cookie&, cookie);
connection.connect();
OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream(), &UTF-8&); // utf-8编码
StringBuffer sb = new StringBuffer();
for (String s : params.keySet()) {
sb.append(s + &=& + params.get(s) + &&&);
System.out.println(&携带的参数:& + sb.toString().substring(0, sb.length() - 1));
out.append(sb.toString().substring(0, sb.length() - 1));
out.flush();
out.close();
int code = connection.getResponseCode();
BufferedReader in =
if (code == 200) {
in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
in = new BufferedReader(new InputStreamReader(connection.getErrorStream()));
System.out.println(&响应码:& + code);
// 定义BufferedReader输入流来读取URL的响应
StringBuffer sb1 = new StringBuffer();
while ((line = in.readLine()) != null) {
sb1.append(line);
return sb1.toString();
} catch (IOException e) {
System.err.println(e.getMessage());
return &error&;
3、UnitSwitch:
package com.example.
import java.text.DecimalF
public class UnitSwitch {
* 处理文件大小
public static String formatSize(long size) {
DecimalFormat fnum = new DecimalFormat(&##0.0&);
if (size & (1024 * 1024 * 1024)) {
result = fnum.format((size / ((float) (1024 * 1024 * 1024)))) + &GB&;
}else if (size & (1024 * 1024)) {
result = fnum.format((size / ((float) (1024 * 1024)))) + &MB&;
} else if (size & 1024) {
result = fnum.format((float) size / ((float) 1024)) + &KB&;
result = String.valueOf((int) size) + &B&;
* @author gaoqiang
* 计算网络速率 *
* 返回的格式 Kb/s * @param delta * : 传入一个Bytes数据 * @param duration_time * : 下载delta数据所需要用的时间 * @return */ public static String calculateSpeed(long delta, long duration_time) { DecimalFormat fnum = new DecimalFormat(&##0.0&); String speedS float speed = ((float) delta * 1000 / (float) (duration_time));// 毫秒转换 if (speed & (1024 * 1024)) { speedStr = fnum.format((speed / ((float) (1024 * 1024)))) + &M/s&; } else if (speed & 1024) { speedStr = fnum.format((float) speed / ((float) 1024)) + &K/s&; } else { speedStr = String.valueOf((int) speed) + &B/s&; } return speedS } }
4、Response20:
package com.example.
* 服务器返回的json,转java对象
* 错误码为20 代表需要验证码
* @author gaoqiang
public class Response20 {
String request_
String server_
public String getErrno() {
public void setErrno(String errno) {
this.errno =
public String getRequest_id() {
return request_
public void setRequest_id(String request_id) {
this.request_id = request_
public String getServer_time() {
return server_
public void setServer_time(String server_time) {
this.server_time = server_
public String getVcode() {
public void setVcode(String vcode) {
this.vcode =
public String getImg() {
public void setImg(String img) {
this.img =
5、SetDataBean:
package com.example.
public class SetDataBean {
private FileList file_
public String getSign() {
public void setSign(String sign) {
this.sign =
public String getTimestamp() {
public void setTimestamp(String timestamp) {
this.timestamp =
public String getBdstoken() {
public void setBdstoken(String bdstoken) {
this.bdstoken =
public String getUk() {
public void setUk(String uk) {
public String getShareid() {
public void setShareid(String shareid) {
this.shareid =
public FileList getFile_list() {
return file_
public void setFile_list(FileList file_list) {
this.file_list = file_
public static class FileList {
public String getErrno() {
public void setErrno(String errno) {
this.errno =
public List[] getList() {
public void setList(List[] list) {
this.list =
public static class List {
String app_
String fs_
String server_
public String getApp_id() {
return app_
public void setApp_id(String app_id) {
this.app_id = app_
public String getFs_id() {
return fs_
public void setFs_id(String fs_id) {
this.fs_id = fs_
public String getServer_filename() {
return server_
public void setServer_filename(String server_filename) {
this.server_filename = server_
public String getSize() {
public void setSize(String size) {
this.size =
6、运行的截图:
运行的参数图:NO NAME - NF - 单曲 - 网易云音乐
所属专辑:
包含这首歌的歌单
////Wordsplayed
网易云音乐多端下载
同步歌单,随时畅听320k好音乐
网易公司版权所有(C)杭州乐读科技有限公司运营:
违法和不良信息举报电话:6
举报邮箱:NO NAME - NF - 单曲 - 网易云音乐
所属专辑:
包含这首歌的歌单
网易云音乐多端下载
同步歌单,随时畅听320k好音乐
网易公司版权所有(C)杭州乐读科技有限公司运营:
违法和不良信息举报电话:6
举报邮箱:

我要回帖

更多关于 百度网盘电脑版下载 的文章

 

随机推荐