文章目录
一、工作任务
数据爬取周期为一天一次,对百度云服务器数据爬取。
二、工作过程
#变更购买地区
location=driver.find_element_by_id('ctrl-bcc-price-region').find_element_by_tag_name('ul').find_elements_by_tag_name('li')[location_num]
location_text=location.text
location.click()
if location_num !=0:
time.sleep(5)
time.sleep(5)
#变更产品类型
product_type=driver.find_element_by_id('ctrl-bcc-price-subServiceType').find_element_by_tag_name('ul').find_elements_by_tag_name('li')[product_type_num]
product_type_text=product_type.text
if product_type_text not in serviceTypeList:
#print(location_text,' ','跳出')
break
else:
#pri