Commit 9a37ba2213e70e50e368c4e424d443bfcff03b79

Authored by Noah ago
1 parent 3f21d0e797
Exists in master

fr 부서진 링크도 수집

Showing 1 changed file with 10 additions and 3 deletions Side-by-side Diff

insight/url.py View file @ 9a37ba2
... ... @@ -7,6 +7,8 @@
7 7  
8 8 class Url() :
9 9  
  10 + server = "http://10.128.0.20/"
  11 +
10 12 def url2dic(self, links):
11 13 data = []
12 14  
... ... @@ -27,7 +29,8 @@
27 29 })
28 30  
29 31 elif self.isrpiki(link) :
30   -
  32 + print "여기?"
  33 + print link
31 34 data.append({
32 35 'bitly_url' : "",
33 36 'origin_url': str(link),
34 37  
35 38  
... ... @@ -101,11 +104,15 @@
101 104  
102 105 def rpiki2click(self,url):
103 106 #print url
104   - api = "http://10.128.0.20/contents_RPIKI_api/"
  107 + api = self.server + "contents_RPIKI_api/"
105 108  
106 109 try:
107   - cid = url.split("cid=")[1].split("&")[0]
108 110 fr = url.split("fr=")[1].split("&")[0]
  111 + except:
  112 + fr = ""
  113 +
  114 + try:
  115 + cid = url.split("cid=")[1].split("&")[0]
109 116 m = url.split("m=")[1].split("&")[0]
110 117 c = url.split("c=")[1].split("&")[0]
111 118 v = url.split("v=")[1].split("&")[0]