-
Notifications
You must be signed in to change notification settings - Fork 106
/
Copy pathdocDownloader.py
45 lines (40 loc) · 1.16 KB
/
docDownloader.py
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
import fire
import os
def main():
if not os.path.exists('./temp'):
os.mkdir('./temp')
if not os.path.exists('./output'):
os.mkdir('./output')
while True:
url = input("请输入网址(输入exit退出):")
if 'doc88' in url:
# 道客巴巴
import doc88
doc88.download(url)
elif 'book118' in url:
# 原创力
import book118
book118.download(url)
elif 'taodocs' in url:
# 淘豆网
import taodocs
taodocs.download(url)
elif 'docin' in url:
# 豆丁
# http://211.147.220.164/index.jsp?file=96519470&width=800&pageno=1
import douding
douding.download(url)
elif 'jinchutou' in url:
# 金锄头
import jinchutou
jinchutou.download(url)
elif 'ishare' in url:
import ishare
ishare.download(url)
elif 'exit' in url:
break
else:
print('暂不支持')
if __name__ == "__main__":
fire.Fire(main)
# "https://www.doc88.com/p-6099938057537.html"