소스 검색

fix db upload error

Jason 2 년 전
부모
커밋
df1b24e946
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      website_clickjobs/type-V/_execute.py

+ 4 - 1
website_clickjobs/type-V/_execute.py

@@ -91,8 +91,11 @@ def process_one(term, target, n, sr, se):
             print("Clicked")
             time_stamp = datetime.fromtimestamp(time.time())
             time_stamp = time_stamp.strftime("%Y-%m-%d %H:%M:%S")
-            if se==0:
+            if se==1:
+                table=db['nda_log']
+            else:
                 table=db['general_log']
+            
             table.insert({'ranking':resultrank,'kw':term,'results':count,'url':resultlink,'title':resultttl,'dt':time_stamp})
             time.sleep(30)