yzfedora / baidudl Goto Github PK
View Code? Open in Web Editor NEWThis is a multi-thread download tool for pan.baidu.com
License: GNU General Public License v3.0
This is a multi-thread download tool for pan.baidu.com
License: GNU General Public License v3.0
according to the error information, I installed jasson-2.12 successfully, but when I make again, another make error occured
Here is my error detail:
/usr/local/include/jansson.h:135: undefined reference to `json_delete'
collect2: error: ld returned 1 exit status
Makefile:345: recipe for target 'bdpandl' failed
make[2]: *** [bdpandl] Error 1
make[2]: Leaving directory '/home/lei/github-repo/baidudl/src'
Makefile:351: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/lei/github-repo/baidudl'
Makefile:292: recipe for target 'all' failed
make: *** [all] Error 2
happened at: Ubuntu 18.04 amd64
/mnt/c/Users/ylila/lab/baidudl/src# make
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT dlpart.o -MD -MP -MF .deps/dlpart.Tpo -c -o dlpart.o dlpart.c
mv -f .deps/dlpart.Tpo .deps/dlpart.Po
gcc -g -O2 -Wall -Wextra -lpthread -ljansson -o bdpandl bdpandl.o dlcommon.o dlinfo.o dlpart.o dlscrolling.o dllist.o err_handler.o dlbuffer.o dlssl.o -lcurl -lpthread
dlpart.o: In function `baidu_error_check':
/mnt/c/Users/ylila/lab/baidudl/src/dlpart.c:47: undefined reference to `json_loadb'
/mnt/c/Users/ylila/lab/baidudl/src/dlpart.c:50: undefined reference to `json_object_get'
/mnt/c/Users/ylila/lab/baidudl/src/dlpart.c:51: undefined reference to `json_object_get'
/mnt/c/Users/ylila/lab/baidudl/src/dlpart.c:55: undefined reference to `json_integer_value'
/mnt/c/Users/ylila/lab/baidudl/src/dlpart.c:56: undefined reference to `json_string_value'
dlpart.o: In function `json_decref':
/usr/local/include/jansson.h:129: undefined reference to `json_delete'
collect2: error: ld returned 1 exit status
Makefile:345: recipe for target 'bdpandl' failed
make: *** [bdpandl] Error 1
liberr can't be compiled.
Please take a look my debug information:
bdpandl -d 5 -n 5 "https://d11.baidupcs.com/file/ce3c40d6636a176351c15fb3b99dd88a?bkt=p3-0000e991d91cc454a73dcc7117ef07edcd24&xcode=f19376c6ef1b92cc9ef1bae760d2a1c2c64cc6201111a512230e8240066c6ae634fd712cebb40050&fid=3532746553-250528-679694564704771&time=1522172136&sign=FDTAXGERLQBHSKa-DCb740ccc5511e5e8fedcff06b081203-m%2Fv%2Bd3Hsy3RvEBXfoJhK28p79Uo%3D&to=d11&size=3768805274&sta_dx=3768805274&sta_cs=63202&sta_ft=mp4&sta_ct=5&sta_mt=1&fm2=MH%2CYangquan%2CAnywhere%2C%2Cnew_york%2Cany&vuk=1496566989&iv=0&newver=1&newfm=1&secfm=1&flow_ver=3&pkey=0000e991d91cc454a73dcc7117ef07edcd24&sl=76480590&expires=8h&rt=sh&r=248414905&mlogid=1996122626872874054&vbdid=3723150705&fin=%E7%8B%97%E5%8D%81%E4%B8%89.mp4&fn=%E7%8B%97%E5%8D%81%E4%B8%89.mp4&rtype=1&dp-logid=1996122626872874054&dp-callid=0.1.1&hps=1&tsl=80&csl=80&csign=LvjJ57Fc%2BFmI9uEePVIqRlqnxQA%3D&so=0&ut=6&uter=4&serv=1&uc=2643518180&ic=3351836320&ti=bfb42dc18c68bf069c6fbe6bd649483d63fc02c6ec817aaf&by=themis"
--------------Received Meta info---------------
HTTP/1.1 302 Moved Temporarily
Server: bfe/1.0.8.13-sslpool-patch
Date: Tue, 27 Mar 2018 18:03:31 GMT
Content-Type: text/html
Content-Length: 160
Connection: keep-alive
Location: http://www.baidupcs.com/403.html
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS, HEAD
--------------Received Meta info---------------
HTTP/1.1 403 Forbidden
Date: Tue, 27 Mar 2018 18:03:31 GMT
Content-Type: text/html
Content-Length: 62
Connection: close
ETag: "5566be1c-3e"
Server: POMS/CloudUI 1.0
--------------Received Meta info---------------
HTTP/1.1 302 Moved Temporarily
Server: bfe/1.0.8.13-sslpool-patch
Date: Tue, 27 Mar 2018 18:03:32 GMT
Content-Type: text/html
Content-Length: 160
Connection: keep-alive
Location: http://www.baidupcs.com/403.html
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS, HEAD
--------------Received Meta info---------------
HTTP/1.1 403 Forbidden
Date: Tue, 27 Mar 2018 18:03:33 GMT
Content-Type: text/html
Content-Length: 62
Connection: keep-alive
ETag: "5566be1c-3e"
Server: POMS/CloudUI 1.0
读取文件的参数竟然不是-f。
原来的pan-baidu-download经常不能用,有空试试好了。
./bdpandl -n 100 -d 8 'https://www.baidupcs.com/rest/2.0/pcs/stream?method=download&access_token=23.e9d2d9d8df1c70437ae2cd9e55748b15.2592000.1482907541.4045822070-1641135&path=%2Fapps%2Fwp2pcs%2F%E5%86%B0%E5%B7%9D%2FCarnage.Park.2016.1080p.BluRay.x264.DTS-HD.MA.5.1-FGT%2FCarnage.Park.2016.1080p.BluRay.x264.DTS-HD.MA.5.1-FGT.mkv'
--------------Received Meta info---------------
HTTP/1.1 200 OK
Date: Tue, 29 Nov 2016 05:14:28 GMT
Content-Type: application/octet-stream
Connection: close
x-bs-file-size: 7100830047
x-bs-meta-crc32: 1621376268
x-poms-key: 0000e1c993f7072aae0734b21fd05759a128
ETag: 509aea60d5abc46d882818f95d9cc508
x-bs-client-ip: MTExLjIwMS4wLjE2NQ==
Content-Length: 7100830047
x-bs-request-id: MTAuNTQuMjcuMjc6ODY0Mzo3NzM2MDA1OTY2OTMxNjI5NDExOjIwMTYtMTEtMjkgMTM6MTQ6Mjc=
Content-Disposition: attachment;filename="Carnage.Park.2016.1080p.BluRay.x264.DTS-HD.MA.5.1-FGT.mkv"
Content-MD5: 509aea60d5abc46d882818f95d9cc508
superfile: 2
Accept-Ranges: bytes
Last-Modified: Fri, 04 Nov 2016 13:54:30 GMT
Server: POMS/CloudUI 1.0
--------------Received Meta info---------------
HTTP/1.1 200 OK
Date: Tue, 29 Nov 2016 05:14:28 GMT
Content-Type: application/octet-stream
Connection: keep-alive
x-bs-file-size: 7100830047
x-bs-meta-crc32: 1621376268
Cache-Control: max-age=259200
ETag: 509aea60d5abc46d882818f95d9cc508
x-bs-client-ip: MTExLjIwMS4wLjE2NQ==
Content-Length: 7100830047
x-bs-request-id: MTAuNTQuMzYuNTM6ODY0Mzo3NzM2MDA2MDE2MjQwOTQzMTc3OjIwMTYtMTEtMjkgMTM6MTQ6Mjg=
Content-Disposition: attachment;filename="Carnage.Park.2016.1080p.BluRay.x264.DTS-HD.MA.5.1-FGT.mkv"
Content-MD5: 509aea60d5abc46d882818f95d9cc508
superfile: 2
Accept-Ranges: bytes
Last-Modified: Fri, 04 Nov 2016 13:54:30 GMT
Server: POMS/CloudUI 1.0
filename=Carnage.Park.2016.1080p.BluRay.x264.DTS-HD.MA.5.1-FGT.mkv, length=7100830047
thread 0 starting to download range: 6389760-443801876
thread 2 starting to download range: 893992960-1331405630
thread 3 starting to download range: 1337786368-1775207507
thread 1 starting to download range: 450183168-887603753
thread 4 starting to download range: 1781596160-2219009384
thread 5 starting to download range: 2225389568-2662811261
thread 6 starting to download range: 2669199360-3106613138
thread 7 starting to download range: 3112992768-3550415015
thread 8 starting to download range: 3556802560-3994216892
thread 9 starting to download range: 4000595968-4438018769
thread 10 starting to download range: 4444405760-4881820646
thread 11 starting to download range: 4889264128-5325622523
thread 12 starting to download range: 5333073920-5769424400
thread 13 starting to download range: 5776867328-6213226277
thread 14 starting to download range: 6220677120-6657028154
thread 15 starting to download range: 6664470528-7100830046
Carnage.Park.2016.1080p.BluRay.x264.DTS-HD.MA.5.1-FGT.mkv 6.6GiB 1.7% 2.3MiB/s 00:49:17 [16]
make in OS X.
in file dlinfo.c:
fatal error: 'malloc.h' file not found
add
#include <stdio.h>
#include <malloc/malloc.h>
problem solved.
安装后,关闭所有其他插件,只保留baidul和IDM,ready但不显示High speed links
环境:
chrome58.0.3029.110 (64-bit)
win10-64bit
这样跨 distro 好用
The title says it all...
My environment:
OSX 10.11.5
gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Warnings:
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in src
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT bdpandl.o -MD -MP -MF .deps/bdpandl.Tpo -c -o bdpandl.o bdpandl.c
mv -f .deps/bdpandl.Tpo .deps/bdpandl.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT dlcommon.o -MD -MP -MF .deps/dlcommon.Tpo -c -o dlcommon.o dlcommon.c
mv -f .deps/dlcommon.Tpo .deps/dlcommon.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT dlinfo.o -MD -MP -MF .deps/dlinfo.Tpo -c -o dlinfo.o dlinfo.c
dlinfo.c:242:10: warning: address of array 'dl->di_filename' will always
evaluate to 'true' [-Wpointer-bool-conversion]
if (dl->di_filename && *dl->di_filename)
~~~~^~~~~~~~~~~ ~~
1 warning generated.
mv -f .deps/dlinfo.Tpo .deps/dlinfo.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT dlpart.o -MD -MP -MF .deps/dlpart.Tpo -c -o dlpart.o dlpart.c
mv -f .deps/dlpart.Tpo .deps/dlpart.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT scrolling_display.o -MD -MP -MF .deps/scrolling_display.Tpo -c -o scrolling_display.o scrolling_display.c
mv -f .deps/scrolling_display.Tpo .deps/scrolling_display.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT err_handler.o -MD -MP -MF .deps/err_handler.Tpo -c -o err_handler.o err_handler.c
err_handler.c:231:17: warning: format string is not a string literal
(potentially insecure) [-Wformat-security]
syslog(level, buf);
^~~
1 warning generated.
mv -f .deps/err_handler.Tpo .deps/err_handler.Po
gcc -g -O2 -Wall -lpthread -o bdpandl bdpandl.o dlcommon.o dlinfo.o dlpart.o scrolling_display.o err_handler.o -lpthread
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT bdpandl-decode.o -MD -MP -MF .deps/bdpandl-decode.Tpo -c -o bdpandl-decode.o bdpandl-decode.c
mv -f .deps/bdpandl-decode.Tpo .deps/bdpandl-decode.Po
gcc -g -O2 -Wall -o bdpandl-decode bdpandl-decode.o err_handler.o -lpthread
make[2]: Nothing to be done for `all-am'.
/DataVolume/shares/share/bddl/baidudl# autoreconf
/opt/share/automake-1.12/Automake/ChannelDefs.pm line 23:
This Perl hasn't been configured and built properly for the threads
module to work. (The 'useithreads' configuration option hasn't been used.)
Having threads support requires all of Perl and all of the XS modules in
the Perl installation to be rebuilt, it is not just a question of adding
the threads module. (In other words, threaded and non-threaded Perls
are binary incompatible.)
If you want to the use the threads module, please contact the people
who built your Perl.
Cannot continue, aborting.
BEGIN failed--compilation aborted at /opt/lib/perl5/5.8.8/ppc-linux/threads.pm line 28.
Compilation failed in require at /opt/share/automake-1.12/Automake/ChannelDefs.pm line 23.
BEGIN failed--compilation aborted at /opt/share/automake-1.12/Automake/ChannelDefs.pm line 26.
Compilation failed in require at /opt/share/automake-1.12/Automake/Configure_ac.pm line 27.
BEGIN failed--compilation aborted at /opt/share/automake-1.12/Automake/Configure_ac.pm line 27.
Compilation failed in require at /opt/bin/aclocal line 38.
BEGIN failed--compilation aborted at /opt/bin/aclocal line 38.
autoreconf: aclocal failed with exit status: 255
./autogen.sh
提示信息configure.ac:13: installing './compile'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
src/Makefile.am: installing './depcomp'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking dependency style of gcc... (cached) gcc3
checking for pthread_create in -lpthread... yes
checking for curl_easy_init in -lcurl... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for off_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ftruncate... yes
checking for memmove... yes
checking for memset... yes
checking for socket... yes
checking for strchr... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
make
提示信息/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in src
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT bdpandl.o -MD -MP -MF .deps/bdpandl.Tpo -c -o bdpandl.o bdpandl.c
mv -f .deps/bdpandl.Tpo .deps/bdpandl.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT dlcommon.o -MD -MP -MF .deps/dlcommon.Tpo -c -o dlcommon.o dlcommon.c
mv -f .deps/dlcommon.Tpo .deps/dlcommon.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT dlinfo.o -MD -MP -MF .deps/dlinfo.Tpo -c -o dlinfo.o dlinfo.c
dlinfo.c:125:11: warning: implicit declaration of function 'strcasestr' is invalid in C99
[-Wimplicit-function-declaration]
if ((p = strcasestr(header_buf, HEADER_CONTENT_LENGTH))) {
^
dlinfo.c:125:9: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int'
[-Wint-conversion]
if ((p = strcasestr(header_buf, HEADER_CONTENT_LENGTH))) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dlinfo.c:135:9: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int'
[-Wint-conversion]
if ((p = strcasestr(header_buf, HEADER_FILENAME))) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dlinfo.c:197:21: warning: implicit declaration of function 'open_memstream' is invalid in C99
[-Wimplicit-function-declaration]
if (!(header_ptr = open_memstream(&header_buf, &header_len))) {
^
dlinfo.c:197:19: warning: incompatible integer to pointer conversion assigning to 'FILE *'
(aka 'struct __sFILE *') from 'int' [-Wint-conversion]
if (!(header_ptr = open_memstream(&header_buf, &header_len))) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dlinfo.c:246:19: warning: incompatible integer to pointer conversion assigning to 'FILE *'
(aka 'struct __sFILE *') from 'int' [-Wint-conversion]
if (!(header_ptr = open_memstream(&header_buf, &header_len))) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dlinfo.c:599:16: error: use of undeclared identifier 'SIGWINCH'
if (sigaction(SIGWINCH, &act, &old) == -1)
^
dlinfo.c:636:7: warning: passing 'ssize_t *' (aka 'long *') to parameter of type 'size_t *'
(aka 'unsigned long *') converts between pointers to integer types with different sign
[-Wpointer-sign]
&orig_start, &orig_end, &orig_no);
^~~~~~~~~~~
dlinfo.c:91:19: note: passing argument to parameter 'start' here
size_t *start,
^
dlinfo.c:636:20: warning: passing 'ssize_t *' (aka 'long *') to parameter of type 'size_t *'
(aka 'unsigned long *') converts between pointers to integer types with different sign
[-Wpointer-sign]
&orig_start, &orig_end, &orig_no);
^~~~~~~~~
dlinfo.c:92:19: note: passing argument to parameter 'end' here
size_t *end,
^
dlinfo.c:645:6: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
(long)(*dp)->dp_no,
^~~~~~~~~~~~~~~~~~
9 warnings and 1 error generated.
make[2]: *** [dlinfo.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.