Commit c4fd07d3406e6a72675f68dde26f3ad9b797e6b5

Authored by steve ago
Exists in master

Merge branch 'master' of http://gitlab.pikicast.com/Noah/dsfacebook

Showing 1 changed file Side-by-side Diff

insight/url.py View file @ c4fd07d
... ... @@ -15,6 +15,8 @@
15 15 if (True):
16 16 for link in links:
17 17  
  18 + link = link.replace('\n'," ").replace('\r'," ").replace('\'',"")
  19 +
18 20 if len(link) < 5:
19 21 continue
20 22  
... ... @@ -42,7 +44,7 @@
42 44 elif self.isbitly(link):
43 45  
44 46 try:
45   - link = "http://bit.ly/" + re.compile('[^ \.\,\?\!a-zA-Z0-9\u3131-\u3163\uac00-\ud7a3]+').sub("",link.split("//bit.ly/")[1].split(" ")[0])
  47 + link = "http://bit.ly/" + re.compile('[^./a-zA-Z0-9]+').sub("",link.split("//bit.ly/")[1].split(" ")[0])
46 48  
47 49 link_meta = link + "+"
48 50 txt = requests.get(link_meta).text