说明:使用Selenium驱动chrome页面,获得淘宝信息并用BeautifulSoup分析得到结果。
使用Selenium时注意页面的加载判断,以及加载超时的异常处理。
import json
import re
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver. <weixin_38596485> 上传 | 大小:56kb