Jason 2 rokov pred
rodič
commit
4b545b488e

+ 2 - 1
website_clickjobs/n2nart/_clickjob.py

@@ -91,7 +91,8 @@ def process_query(urllist, query, client):
         el = random.choice(clickcand)
         domain_in_link += 1
         print('clicked....')
-        print(el.get_attribute('href'))
+        href = el.get_attribute('href')
+        print(href)
         print(el.text)
         
         webdriver.ActionChains(driver).move_to_element(el).perform()

+ 3 - 1
website_clickjobs/n2nart/icons.py

@@ -1,5 +1,7 @@
 from _clickjob import *
 
+custlist = ["The Icons_EN", "The Icons_ZH"]
+
 db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/seo?charset=utf8mb4')
 
 def reset(cust):
@@ -21,7 +23,7 @@ runcount=0
 while True:
     try:
         data=[]
-        cust = ["The Icons_EN", "The Icons_ZH"]
+        cust = custlist
         print("Gathering data...")
         for c in cust:
             data.append(reset(c))