使用方法:
-
- 将mediafire.com网盘的链接存到文本文件中,每行一个链接.
例如,将此文本文件重命名为 share.txt .
-
- 下载 mediafire.sh
1
|
wget —no–check–certificate –qO ‘mediafire.sh’ “https://moeclub.org/attachment/LinuxShell/mediafire.sh”
|
-
- 下载文件:
1
|
bash mediafire.sh share.txt
|
脚本预览:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/bash
DATAFILE=“$1”;
[[ –f “$DATAFILE” ]] || exit 1;
cat “$DATAFILE” |while read TMPLINE
do
LINE=“$(echo “$TMPLINE” |sed ‘s/\r$//g’ |grep ‘^https\?://www.mediafire.com/’)”;
if [[ –n “$LINE” ]]; then
Index_data=“$(wget –no-check-certificate -qO- “$LINE” |grep -o ‘http://download.*.mediafire.com/.*/.*/.*”;‘ |cut -d’“‘ -f1)”
if [[ –n “$Index_data” ]]; then
echo –en ” \r”;
echo –en ” $(basename “$Index_data” |cut -b 1-48) …\r”;
wget —no–check–certificate –q “$Index_data”;
fi
fi
done
|