[packages/pynapi] - rel 6; drop more urls from desc

arekm arekm at pld-linux.org
Sun Jun 15 20:45:45 CEST 2014


commit f166502e86f0e50eb538753dc9ae3c06d0449dd6
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Jun 15 20:45:41 2014 +0200

    - rel 6; drop more urls from desc

 pynapi.py   | 7 ++++++-
 pynapi.spec | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/pynapi.spec b/pynapi.spec
index 406fa1a..5e84d94 100644
--- a/pynapi.spec
+++ b/pynapi.spec
@@ -2,7 +2,7 @@ Summary:	pynapi - Movie Subtitle Downloader
 Summary(pl.UTF-8):	pynapi - narzędzie do ściągania napisów do filmów
 Name:		pynapi
 Version:	0.18
-Release:	5
+Release:	6
 License:	GPL v3+
 Group:		Applications/Multimedia
 Source0:	pynapi.py
diff --git a/pynapi.py b/pynapi.py
index 54dddb6..91a95c8 100644
--- a/pynapi.py
+++ b/pynapi.py
@@ -83,11 +83,16 @@ def get_desc_links(digest, file=None):
     except Exception, e:
         return False
     links = re_link.findall(d)
-    ignore = [ r'.*napiprojekt\.pl.*', r'.*nokaut\.pl.*', r'.*rodisite\.com.*' ]
+    ignore = [ r'.*dobreprogramy\.pl', r'.*napiprojekt\.pl.*', r'.*nokaut\.pl.*', r'.*rodisite\.com.*' ]
     for i in range(0, len(ignore)):
         ignore[i] = re.compile(ignore[i], re.IGNORECASE)
     ilinks = links[:]
     for l in ilinks:
+        # main pages are useless
+        if l.count('/') < 3:
+            links.remove(l)
+            continue
+        # blacklisted sites
         for i in ignore:
             if i.match(l):
                 links.remove(l)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pynapi.git/commitdiff/f166502e86f0e50eb538753dc9ae3c06d0449dd6



More information about the pld-cvs-commit mailing list