Commit 2f9e1282a315389e98f15bdfc27f79b0c664dd75

Authored by Noah ago
1 parent 0715428971
Exists in master

타임.에러 잡는중

Showing 1 changed file with 6 additions and 13 deletions Side-by-side Diff

... ... @@ -12,7 +12,6 @@
12 12  
13 13 if __name__=='__main__':
14 14  
15   - #token_str = "EAAUTLd5JgaoBAJMeeMXqcdExQ1egUHeBaIgVBCilmiH4K9RNyUt7gSgVZCZAtszWCLEaZCDQpxewhICtFjNRICFPWAqUygshcSsdEZBUeZAyUJkON7bfQ2NFFI5AqifNahzjFT83GkWZCZCZBXO3050XSjFf9HSR0iAZD"
16 15 token = Token()
17 16  
18 17 contexts = Context(token)
19 18  
20 19  
... ... @@ -24,21 +23,15 @@
24 23 time.sleep(1)
25 24 p_id = str(content['id'].split('_')[0])
26 25 c_id = str(content['id'].split('_')[1])
27   - created_time = content['created_time'].replace('T'," ").replace('+0000',"")
28 26  
29   - try:
30   - message = content['message'].replace('\n'," ").replace('\r'," ").replace('\'',"")
31   - except:
32   - message = ""
33   -
34   - try:
35   - message_url = Url().getText2bitly(message)
36   - except:
37   - message_url = ""
38   -
39 27 insight = PostInsight(token)
40 28 insight.setContentInsight(content['id'])
41 29  
  30 + created_time = insight.getContentCreated_time()
  31 + message = insight.getContentMessage()
  32 + message_url = Url().getText2bitly(message)
  33 +
  34 +
42 35 lists =["post_story_adds_unique",
43 36 "post_story_adds",
44 37 "post_story_adds_by_action_type_unique,comment",
... ... @@ -123,7 +116,7 @@
123 116 sqlprefix = sqlprefix[:len(sqlprefix)-2] + ")"
124 117 sqlvalues = sqlvalues[:len(sqlvalues)-2] + ");"
125 118  
126   - #print sqlprefix + sqlvalues
  119 + print sqlprefix + sqlvalues
127 120  
128 121 datadb.fb_insert(sqlprefix + sqlvalues)
129 122 datadb.fb_insert(sqlreplace + sqlprefix[32:] + sqlvalues)