hyisangie

2021年8月15日 #

selenium遍历元素时获得重复结果

摘要: 在获取网页源代码之后,对数据进行提取。 def get_goods_info(self): ''' 解析得到商品信息字段 ''' li_list = self.driver.find_elements_by_xpath('//div[@class="lego-pc-search-list pc-se 阅读全文

posted @ 2021-08-15 22:04 hyisangie 阅读(510) 评论(0) 推荐(0) 编辑

爬虫反爬之User-Agent池

摘要: 列表,放多个 User-Agent,每次随机提取 user_agent_list = [ "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 " "(KHTML, like Gecko) Chrome/22.0.1207.1 Safari/5 阅读全文

posted @ 2021-08-15 08:52 hyisangie 阅读(136) 评论(0) 推荐(0) 编辑

导航