|
@@ -38,7 +38,7 @@ def empty_query(q):
|
|
|
driver.get(googleurl)
|
|
|
time.sleep(3)
|
|
|
|
|
|
-def process_query(domain, target_id, brands, query):
|
|
|
+def process_query(domain, target_id, url, query):
|
|
|
print(target_id)
|
|
|
sleepoffset = 0
|
|
|
global driver
|
|
@@ -78,16 +78,19 @@ def process_query(domain, target_id, brands, query):
|
|
|
elmts=driver.find_elements("xpath","//div[@class='yuRUbf']/a")
|
|
|
|
|
|
targets=[]
|
|
|
- targets.append("https://hhh.com.tw/HHH_NEW/designers/index_designerList.php?cid=" + target_id)
|
|
|
- targets.append("https://m.hhh.com.tw/HHH_NEW/designers/index_designerList.php?cid=" + target_id)
|
|
|
- targets.append("https://hhh.com.tw/HHH_NEW/designers_static/" + target_id + ".html")
|
|
|
- targets.append("https://m.hhh.com.tw/HHH_NEW/designers_static/" + target_id + ".html")
|
|
|
- targets.append("https://hhh.com.tw/designer-about.php?designer_id=" + target_id + ".html")
|
|
|
- targets.append("https://m.hhh.com.tw/designer-about.php?designer_id=" + target_id + ".html")
|
|
|
-
|
|
|
- targets.append("https://www.hhh.com.tw/HHH_NEW/designers/index_designerList.php?cid=" + target_id)
|
|
|
- targets.append("https://www.hhh.com.tw/HHH_NEW/designers_static/" + target_id + ".html")
|
|
|
- targets.append("https://www.hhh.com.tw/designer-about.php?designer_id=" + target_id + ".html")
|
|
|
+ if int(target_id) > 50000: #50XXX = FAQ
|
|
|
+ targets.append(url)
|
|
|
+ else:
|
|
|
+ targets.append("https://hhh.com.tw/HHH_NEW/designers/index_designerList.php?cid=" + target_id)
|
|
|
+ targets.append("https://m.hhh.com.tw/HHH_NEW/designers/index_designerList.php?cid=" + target_id)
|
|
|
+ targets.append("https://hhh.com.tw/HHH_NEW/designers_static/" + target_id + ".html")
|
|
|
+ targets.append("https://m.hhh.com.tw/HHH_NEW/designers_static/" + target_id + ".html")
|
|
|
+ targets.append("https://hhh.com.tw/designer-about.php?designer_id=" + target_id + ".html")
|
|
|
+ targets.append("https://m.hhh.com.tw/designer-about.php?designer_id=" + target_id + ".html")
|
|
|
+
|
|
|
+ targets.append("https://www.hhh.com.tw/HHH_NEW/designers/index_designerList.php?cid=" + target_id)
|
|
|
+ targets.append("https://www.hhh.com.tw/HHH_NEW/designers_static/" + target_id + ".html")
|
|
|
+ targets.append("https://www.hhh.com.tw/designer-about.php?designer_id=" + target_id + ".html")
|
|
|
|
|
|
print (len(elmts))
|
|
|
# driver.save_screenshot('c:/tmp/test.png')
|