Advertisement

利用selenium获取淘宝商品数据

阅读量:
复制代码
    # #使用selenium抓取淘宝商品数据
    # # 通过传入关键词  得到要找的关键词商品的网页
    # # 解析网页中的商品数据
    # #  将解析后的数据保存到mongodb
    from selenium import webdriver
    from selenium.common.exceptions import TimeoutException
    from selenium.webdriver.common.by import By
    from selenium.webdriver.support import expected_conditions as EC
    from selenium.webdriver.support.wait import WebDriverWait
    from urllib.parse import quote
    from pyquery import  PyQuery as pq
    import pymongo
    
    
    # ###无界面模式 爬取的时候不会弹出浏览器
    # chrome_options = webdriver.ChromeOptions()
    # chrome_options.add_argument('--he

全部评论 (0)

还没有任何评论哟~