-
Notifications
You must be signed in to change notification settings - Fork 0
/
scrapper.py
39 lines (37 loc) · 1.21 KB
/
scrapper.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
import sys
from visualMajor import visual
from scrapperMajor import headless
from os import path, mkdir
command = sys.argv
if len(command) > 1:
if command[1] == "visual":
if path.exists('data'):
print('Already Exists...')
else:
mkdir('data')
print('No data directory found.')
print('Creating Directory...')
visual()
elif command[1] == "headless":
if path.exists('data'):
print('Already Exists...')
else:
mkdir('data')
print('No data directory found.')
print('Creating Directory...')
headless()
elif command[1] == "help":
print("""
Usage: python3 scrapper.py [arguments]
Arguments:
visual - To view scrapping result both commandline and in browser
headless - To view scrapping result in commandline only
help - To view this help pompt""")
else:
print("Error: No argument provided or invalid argument.")
print("""
Usage: python3 scrapper.py [arguments]
Arguments:
visualScrapper - To view scrapping result both commandline and in browser
commandLineScrapper - To view scrapping result in commandline only
help - To view this help pompt""")