分类: Python

2 篇文章

Python-Beanutiful Soup
(一) 安装 pip install beautifulsoup4 pip install lxml 或 pip install html5lib (二) Tag from bs4 import BeautifulSoup # 直接 .标签 bs4.p # name和attrs两个属性 bs4.p["href"] bs4.p.get("href")…
Python-Selenium使用记录
(一) 启动浏览器 1. 普通启动方式 #!/usr/bin/python3 # encoding:utf-8 from selenium import webdriver #启动Firefox浏览器 #browser = webdriver.Firefox() #启动IE浏览器 #browser = webdriver.Ie() #启动Chrom…