-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyfetch.py
21 lines (17 loc) · 1.12 KB
/
pyfetch.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#__author__=DGideas
def fetch(website,outfile):
import subprocess;
subprocess.check_output('wget --output-document='+str(outfile)+' -q "'+str(website)+'"',shell=True);
return;
def fetchA(website,outfile,user,password,useragent="Links (2.8; Linux 2.6.32-504.30.3.el6.x86_64 x86_64; GNU C 4.4.7; text)"):
import subprocess;
subprocess.check_output('wget --user='+str(user)+' --password='+str(password)+' --user-agent="'+str(useragent)+'" --output-document='+str(outfile)+' -q "'+str(website)+'"',shell=True);
return;
def fetchU(website,outfile,useragent="Links (2.8; Linux 2.6.32-504.30.3.el6.x86_64 x86_64; GNU C 4.4.7; text)"):
import subprocess;
subprocess.check_output('wget --user-agent="'+str(useragent)+'" --output-document='+str(outfile)+' -q "'+str(website)+'"',shell=True);
return;
def fetchAU(website,outfile,user,password,useragent="Links (2.8; Linux 2.6.32-504.30.3.el6.x86_64 x86_64; GNU C 4.4.7; text)"):
import subprocess;
subprocess.check_output('wget --user='+str(user)+' --password='+str(password)+' --user-agent="'+str(useragent)+'" --output-document='+str(outfile)+' -q "'+str(website)+'"',shell=True);
return;