blob: 518669755b6229dd4666071c97bd7a0d3f6f6cf8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/usr/bin/python
# -*-coding:utf-8 -*
import re, os, sys
sujet = []
sujetT = []
#os.system("wget " + sys.argv[1] + " -O index.html -N -q")
regex = '<span class="filesize">(File : |File)<a href="(.*?)" target="_blank">(.*?)</a>'
regex = '<a class="fileThumb" href="(.*?)" target="_blank">'
os.system("mkdir -p dump")
with open("index.html",'r') as f:
for line in f:
yes = re.search(regex, line)
if yes :
print(yes.group(1))
sujetT.append( [yes.group(1)] )
print( "Téléchargement de : " + yes.group(1) )
os.system("wget " + 'http:' + yes.group(1) + " -N -q")
os.system("mv " + yes.group(1)[yes.group(1).rfind('/')+1:] + " dump")
|