瀏覽代碼

print exceptiuon

David 10 年之前
父節點
當前提交
24cd4b360b
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      parser.py

+ 3 - 1
parser.py

@@ -21,6 +21,7 @@ def parseSource(s):
     l=LinkList(s["link"],sel,rss=rss)
 
     kw=d.get_keywords(s["category"])
+#    print(kw)
     if l is not None:
         for a in l.links:
             if not d.article_exists(a):
@@ -76,7 +77,8 @@ def news_worker(source,kw):
             n=News(item,source_id,source_name,kw,html=html)
             print("[Thread %s] Finished" % tname)
             d.insert_article(n.get())
-        except:
+        except Exception as e:
+            print(e)
             print("whut")
         finally:
             q.task_done()