Downloading Files on Baidu, or via HTTP, Bittorrent or Metalink in Linux with BaiduExporter, Aria2 and YAAW

Most firmware files distributed by the manufacturers are uploaded to Baidu, but I’ve found the service not to be always reliable, especially for larger files. In Windows, people are recommended to use Baidu software (BaiduYunGuanjia), but there’s not such tool in Linux, so instead I investigate for command lines tools to download files from Baidu, and this lead me to two interesting tools called Aria2, a “lightweight multi-protocol & multi-source command-line download utility. It supports HTTP/HTTPS, FTP, BitTorrent and Metalink”, and YAAW “Yet Another Aria2 Web Frontend” with allow to start and monitor download locally or remotely.

But let’s start with the first tool I found: pan-baidu-download, a Python script to download files from Baidu.

To install it:


We also need to install some dependencies (assuming python 2.7.x is already installed):


and then you can start downloading files as follows:


But after posting a bug about password-protected download, which was fixed in 2 minutes by the developers, I was informed the script does not support directories, and was recommended to use BaiduExporter add-on for Chrome or Firefox instead.

Everything is in Chinese, and after installing the add-on I was not clear how to use it but I figured it out eventually.

First you need to run aria2c:


The command line above is insecure if you plan to run it on a remote server, as anybody could access it, and start download on your server.  But for testing, and local download this will do. If you stop aria2c, the downloads won’t restart with this command, but there are options that support this, but again, I have not looked into details for this quick test.

Now go to the Baidu download link, select the files and/or folders you want to download, and provided you’ll already installed Baidu Exporter add-on, a new menu will be shown, and all you have to do is click on ARIA2 RPC to start the download in aria2. The last options with two Chinese ideogram is the option, where you can change the IP of the aria2 server (localhost:6800) by default as well as other settings.

BaiduExporter_Firefox
Baidu Download with BaiduExporter in Firefox (Click to Enlarge)

You can now close the Baidu window in your web browser. and should see the download as started in the terminal:




This is all good, but in practise you’d probably want start aria2c when your computer boots and would not be able to monitor progress, especially if you use a remote server, and this is where YAAW comes into play.

To install it, check out the code from Github or download and extract the tar file. Now go to the directoty where you extract the file. and open index.html with your web browser. You can monitor download, or even add HTTP or Bittorrent Downloads. AFAIK, you can’t add Baidu links to YAAW directly, but you can monitor the downloads added via Baidu Exporter

Baidu and Bittorrent Downloads in YAAW
Baidu and Bittorrent Downloads in YAAW

The aria2c IP address and port can be changed in the settings directly from the main page. Some useful tips for YAAW:

  • All your settings on web is temporary. Settings will be lost after aria2 restarted.
  • Tasks (including those that are not finished) will be lost after aria2 is restarted. Use --save-session=SOME/WHERE and reload with --continue=true --input-file=SOME/WHERE to continue.
  • Use $HOME/.aria2/aria2.conf to save your options.

I haven’t gone into details, but Aria2 and YAAW could be used with a NAS, a cheap board with a USB harddrive, or even USB Wireless flash drive such a Zsun SD111 (which is now hackable even without serial debug board, as the default root password has just been cracked) to make a downloader to handle large downloads instead of leaving your PC on at night, or 24/7.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
14 Comments
oldest
newest
dewet
dewet
9 years ago

Why not just use Jdownloader?
So much easier, downloads fast, resumable downloads, entering capthas, works on Windows & Linux.
Might need to set chunks to only 1 for some downloads. Too many connections to Baidu and you have to re-enter a captcha code.
http://jdownloader.org/

Davy
Davy
9 years ago

Nice, thanks for those tips !
The main advantage I see over Jdownloader is that it’s a very much lighter solution and you can use it remotely in a client/server configuration.

Another solution is to copy to copy the file to your personal free 2To Baidu drive and then use this nice GUI linux solution for downloading/uploading/remote-uploading(via torrent) :
https://github.com/LiuLang/bcloud

It have the advantage to have an english interface and distribute debian packages and many others :
https://github.com/LiuLang/bcloud-packages

You can also stream media by right clicking on it and play it with your favorite media player 🙂

Blue
Blue
8 years ago

@dewet

Aria2 is MUCH better! Jdownloader is a ram hog that uses about 300MB of ram because it’s a java program when aria2 only uses under 20MB of ram. Also Jdownloader makes the folder structure kind of weird.

Yashu
8 years ago

Hello! I want to download following document from baidu. I do not understand Chinese and moreover it needs some download points to get the full document. Can you help me to get this document?

Stane1983
7 years ago

Since this post was my starting point when I tried to improve download speeds from baidu cloud, here’s what I came up with:
http://www.stane1983.com/index.php/2016/07/13/how-to-download-faster-from-chinese-baidu-cloud-service-linux/

Theguyuk
Theguyuk
7 years ago

I never use baidu etc but reading this reminded me that while reading other blogs, I saw this mentioned awhile back.

github.com/yzfedora/baidudl

Not a clue if helpful or not!

Theguyuk
Theguyuk
7 years ago


Sorry it is of no help then 🙁

Khadas VIM4 SBC