Your Name 3 rokov pred
rodič
commit
c473fb43bc
1 zmenil súbory, kde vykonal 19 pridanie a 0 odobranie
  1. 19 0
      choozmo/gen_clickjob.py

+ 19 - 0
choozmo/gen_clickjob.py

@@ -0,0 +1,19 @@
+import time
+import json
+import random
+import dataset
+#r = redis.Redis(host='db.ptt.cx', port=6379, db=1)
+#p = r.pubsub(ignore_subscribe_messages=True)
+
+db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/seo?charset=utf8mb4')
+table=db['seo_clickjobs']
+#cursor=db.query('select id,kw from gtrends where name = "'+site+'" order by rand() limit 1')
+
+category='hhh-faq'
+
+qlist=[('預售屋客變教學',0,'hhh.com.tw'),('預售屋客變',0,'hhh.com.tw'),('預售屋客變流程',0,'hhh.com.tw'),('預售屋客變省錢',0,'hhh.com.tw'),('所有的地方都能進行客變嗎',0,'hhh.com.tw'),('什麼是客變',0,'hhh.com.tw')]
+
+for q in qlist:
+    table.insert({'kw':q[0],'page':q[1],'domain':q[2],'category':category})
+
+