浏览代码

ITS CALLED TEXTAREA GDI

Jason 2 年之前
父节点
当前提交
c48c1f3f7f
共有 3 个文件被更改,包括 8 次插入6 次删除
  1. 3 2
      website_clickjobs/n2nart/_clickjob.py
  2. 4 3
      website_clickjobs/n2nart/icons.py
  3. 1 1
      website_clickjobs/type-GD/_clickjob.py

+ 3 - 2
website_clickjobs/n2nart/_clickjob.py

@@ -45,10 +45,11 @@ def process_query(urllist, query, client):
     time.sleep(3)
     print(driver.current_url)
 
-    # elmts=driver.find_elements_by_xpath("//div[@class='yuRUbf']/a")
+    # elmts=driver.find_elements_by_xpath("//div[@class='yuRUbf']/a")a4bIc
     # ABOVE METHOD IS DEPRECATED STARTING SELENIUM 4.3.0, USE THIS
     #
-    elmt = driver.find_element(By.XPATH, "//input[@name='q']")
+    #elmt = driver.find_element(By.XPATH, "//input[@name='q']")
+    elmt = driver.find_element(By.XPATH, "//textarea[@name='q']")
     time.sleep(1)
 
     elmt.send_keys(query)

+ 4 - 3
website_clickjobs/n2nart/icons.py

@@ -4,9 +4,9 @@ custlist = ["The Icons_EN", "The Icons_ZH"]
 
 db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/seo?charset=utf8mb4')
 
-def reset(cust):
-    k=db.query('select * from seo.seo_nton_custkw where cust="' + cust + '"')
-    u=db.query('select * from seo.seo_nton_custurl where cust="' + cust + '"')
+def reset(cust): #USING CUSTKW2 AND CUSTURL2 BECAUSE THE FIRST ONE IS MESSING UP. REVERT BACK LATER.
+    k=db.query('select * from seo.seo_nton_custkw2 where cust="' + cust + '" and disused=0')
+    u=db.query('select * from seo.seo_nton_custurl2 where cust="' + cust + '" and disused=0')
     #TAG ABOVE AND UNTAG BELOW FOR DEBUG
     #ds=hhhdb.query('select * from seo.seo_articles where cust=')
     kwd=[]
@@ -37,6 +37,7 @@ while True:
         for i in range(10):
             print("Run " + str(runcount+1))
             target = random.choice(data) # START HERE
+            print(target)
             target_kw = random.choice(target[0])
             print(target_kw)
             statuscode = execute(target[1], target_kw, target[2]) # target[1] is URL list

+ 1 - 1
website_clickjobs/type-GD/_clickjob.py

@@ -48,7 +48,7 @@ def process_query(url, cust, query):
     # elmts=driver.find_elements_by_xpath("//div[@class='yuRUbf']/a")
     # ABOVE METHOD IS DEPRECATED STARTING SELENIUM 4.3.0, USE THIS
     #
-    elmt = driver.find_element(By.XPATH, "//input[@name='q']")
+    elmt = driver.find_element(By.XPATH, "//textarea[@name='q']")
     time.sleep(1)
 
     elmt.send_keys(query)