Jared 2 years ago
parent
commit
4cce767487
1 changed files with 8 additions and 2 deletions
  1. 8 2
      run4.py

+ 8 - 2
run4.py

@@ -545,8 +545,14 @@ def main():
 
                 if driver.current_url == item_url:continue
                 print(driver.current_url)
-                output = process_web_request_start(driver, fid)
-                if output != 0: break
+                try:
+                    output = process_web_request_start(driver, fid)
+                    if output != 0: break
+                except:
+                    r = redis.Redis(host='db.ptt.cx', port=6379, db=1,password='choozmo9')
+                    msg=traceback.format_exc()
+                    r.set('webreq_error',msg)
+
 
             # reivews
             print('parsing reviews....')