forked from serm12/91porn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
61 lines (49 loc) · 1.12 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
. ./download.sh
echo '======your must setting -u option========= '
cookie="-b language=cn_CN;watch_times=0"
get_domain_name(){
http_check=$(echo $url | cut -d '/' -f "1");
if test $http_check = "http:"; then
domain_name=$(echo $url | cut -d '/' -f "1-3")
echo $domain_name
elif test $http_check = "https:"; then
domain_name=$(echo $url | cut -d '/' -f "1-3")
echo $domain_name
else
domain_name=$(echo $url | cut -d '/' -f "1")
echo $domain_name
fi
}
while getopts "u:p:" arg #选项后面的冒号表示该选项需要参数
do
case $arg in
u)
url=$OPTARG
get_domain_name
;;
p)
#echo "b's arg:$OPTARG"
proxy="-x "$OPTARG
;;
s)
proxy="--socks "$OPTARG
;;
?)
echo "example: run.sh -u http://xxx.xxx.xxx/xxxx or -u http://xxx.xxx.xxx/xxxx -p ip:port "
exit 1
;;
esac
done
if [ -d "./91" ]; then
rm -f -R ./91
mkdir ./91
else
mkdir ./91
fi
if echo $url | grep "v.php" ;then
read_list $url
else
echo $url > ./91/list_url
download
fi