-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathmain.py
32 lines (29 loc) · 966 Bytes
/
main.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
# -*- coding: utf-8 -*-
'''
@Auther :[email protected]
@date :2019/4/8
'''
__author__ = "liuyuqi"
import time,os ,sys
from crawl_xuexi import Xuexi
def banner():
print("""
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
( X | u | e | x | i | . | c | n | | v | i | d | e | o | s )
\_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
""")
print("Author: liuyuqi")
if __name__ == '__main__':
banner()
start_time = time.time()
if not os.path.exists("Video"):
os.mkdir("Video")
if len(sys.argv) == 2:
url = sys.argv[1]
else:
url = input(
"请输入“学习慕课”下面的免费课程链接:(eg:https://www.xuexi.cn/9f584b49d8a7386a4cf248ce16f5e667/9b0f04ec6509904be734f5f609a3604a.html)")
xuexi=Xuexi()
xuexi.crawl(url)
print("last time: {} s".format(time.time() - start_time))