Jason hai 1 ano
pai
achega
932dac685a
Modificáronse 1 ficheiros con 12 adicións e 8 borrados
  1. 12 8
      website_clickjobs/type-V/c2.py

+ 12 - 8
website_clickjobs/type-V/c2.py

@@ -22,14 +22,18 @@ if clickvideo == 1 or clickvideo == 2:
     runcount=0
     kws=None
     while True:
-        runcount+=1
-        start_time = time.time()
-        kw = pickterm(client)
-        target = addvids(target)
-        print(len(target))
-        process_one(kw, target, clickvideo, savefile, sec)
-        duration = time.time()-start_time
-        print("Runs: " + str(runcount) + " | Duration: " + str(duration))
+        try:
+            runcount+=1
+            start_time = time.time()
+            kw = pickterm(client)
+            target = addvids(target)
+            print(len(target))
+            process_one(kw, target, clickvideo, savefile, sec)
+            duration = time.time()-start_time
+            print("Runs: " + str(runcount) + " | Duration: " + str(duration))
+        except:
+            print('Runtime Error')
+            traceback.print_exc()
         time.sleep(7)
 
 elif savefile == 1: