projects
/
openlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Улучшена обработка ошибок, в т.ч. с избыточно длинными комментариями.
[openlib.git]
/
get_flibusta.py
diff --git
a/get_flibusta.py
b/get_flibusta.py
index 13768c47930a9be4b4477d29c74460088a45f8da..64098473bba78122d023f2f6ec2aff990651db9b 100755
(executable)
--- a/
get_flibusta.py
+++ b/
get_flibusta.py
@@
-12,7
+12,7
@@
os.environ['no_proxy']='localhost,127.0.0.1'
proxies = {'http': 'http://localhost:3128'}
proxies = {'http': 'http://localhost:3128'}
-for host in ['flibusta
hezeous3.onion','flibusta.i2p','flibusta.net
']:
+for host in ['flibusta
.lib','flibustahezeous3.onion','flibusta.i2p
']:
try:
print "Trying %s" % (host)
try:
print "Trying %s" % (host)
@@
-20,13
+20,13
@@
for host in ['flibustahezeous3.onion','flibusta.i2p','flibusta.net']:
html = BeautifulSoup(html_page)
os_command = "wget -c -q -P \"%s\" http://%s/daily/%s" % (db.upload_files,host,'%s')
html = BeautifulSoup(html_page)
os_command = "wget -c -q -P \"%s\" http://%s/daily/%s" % (db.upload_files,host,'%s')
- print os_command
matched = False
for link in html.findAll('a'):
file = link.get("href")
print file
if pattern.match(file):
matched = False
for link in html.findAll('a'):
file = link.get("href")
print file
if pattern.match(file):
+ print "Pattern matched"
matched = True
if not db.TestArchive(file):
print "Processing %s" % file
matched = True
if not db.TestArchive(file):
print "Processing %s" % file