jared 3 년 전
부모
커밋
246610f5af
1개의 변경된 파일12개의 추가작업 그리고 11개의 파일을 삭제
  1. 12 11
      swire_shop_item_list.py

+ 12 - 11
swire_shop_item_list.py

@@ -118,6 +118,13 @@ def get_next_job(db,repeat=False,repkw=None,repnum=None):
         result['num']=c['num']
         break
 
+    cursor = db.query('select lat,lon,loc from lat_lon_loc where num ="'+str(result['num'])+'"')
+    for c in cursor:
+        result['lat']=c['lat']
+        result['lon']=c['lon']
+        result['loc']=c['loc']
+        break
+
     if repeat:
         result['kw']=repkw
         result['num']=repnum
@@ -135,19 +142,13 @@ def get_next_job(db,repeat=False,repkw=None,repnum=None):
             return result
     
 
-    cursor = db.query('select lat,lon,loc from lat_lon_loc where num ="'+str(result['num'])+'"')
-    for c in cursor:
-        result['lat']=c['lat']
-        result['lon']=c['lon']
-        result['loc']=c['loc']
-        break
 
-    if repeat:
+#    if repeat:
 
-        cursor = db.query('select  lat_txt,lon_txt from swire_store_list where num ="'+str(result['num'])+'" and keyword="'+result['kw']+'" order by rand() limit 1')
-        for c in cursor:
-            result['lat']=c['lat_txt']
-            result['lon']=c['lon_txt']
+#        cursor = db.query('select  lat_txt,lon_txt from swire_store_list where num ="'+str(result['num'])+'" and keyword="'+result['kw']+'" order by rand() limit 1')
+#        for c in cursor:
+#            result['lat']=c['lat_txt']
+#            result['lon']=c['lon_txt']
 
     return result