(not real) weibo user album batch download tool (CLI)
build user album by picking all photos from original weibos in user's post feed
for more weibo free login APIs, turn to wiki
$ pip install requests
$ pip install colorama # only windows version under 10.0.14393 required
$ pip install futures # only python2 environment required
$ python .\weiboPicDownloader.py -h
usage: weiboPicDownloader [-h] (-u user [user ...] | -f file [file ...])
[-d directory] [-s size] [-r retry] [-i interval]
[-c cookie] [-b boundary] [-n name] [-v] [-o]
optional arguments:
-h, --help show this help message and exit
-u user [user ...] specify nickname or id of weibo users
-f file [file ...] import list of users from files
-d directory set picture saving path
-s size set size of thread pool
-r retry set maximum number of retries
-i interval set interval for feed requests
-c cookie set cookie if needed
-b boundary focus on weibos in the id range
-n name customize naming format
-v download videos together
-o overwrite existing files
Required argument (choose one)
-u user ...users (nickname or id)-f file ...user list files (nickname or id, separated by linefeed in the file)
Optional arguments
-d directorymedia saving path (default value:./weiboPic)-s sizethread pool size (default value:20)-r retrymax retries (default value:2)-i intervalrequest interval (default value:1, unit: second)-c cookielogin credential (only need the value of a certain key namedSUB)-b boundarymid/bid/date range of weibos (format:id:idbetween,:idbefore,id:after,idcertain,:all)-n namenaming template (identifier:url,index,type,mid,bid,date,text,name, like "f-Strings" syntax)-vdownload miaopai videos at the same time-ooverwrite existing files (skipping if exists for default)
✳How to get the value of SUB from browser (Chrome for example)
- jump to https://m.weibo.cn and log in
- inspect > Application > Cookies > https://m.weibo.cn
- double click the
SUBline and copy its value - paste it into terminal and run like
-c <value>
