摘要: 抓取天气 import requests from bs4 import BeautifulSoup # from pyecharts import Bar cities_temp = [] # 处理抓取页面 def parse_url(url): headers = {"User-Agent": 阅读全文
posted @ 2021-01-27 16:40 Bonnie_ξ 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 案例 import requests import os from requests.packages import urllib3 from pyquery import PyQuery as pq import re # 解析数据 import ssl os.chdir(r"E:/pics222 阅读全文
posted @ 2021-01-27 16:37 Bonnie_ξ 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 案例 from selenium import webdriver from selenium.webdriver.common.keys import Keys # 键盘按键操作 import time def get_goods(driver): try: goods = driver.find 阅读全文
posted @ 2021-01-27 16:32 Bonnie_ξ 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 案例 import os from hashlib import md5 from selenium import webdriver import requests from lxml import etree # 首页请求 def get_response(url): headers = {"u 阅读全文
posted @ 2021-01-27 16:26 Bonnie_ξ 阅读(94) 评论(0) 推荐(0) 编辑
摘要: tags: #正则表达式 #HTML提取 匹配任意字符不能跨行:.* 匹配任意字符包括换行符等:[\s\S]* 捕获某前缀与某后缀之间的任意字符:(.*?) 使用情况举例,捕获下面HTML中的文字“不迟any” HTML:<a href='http://www.cnblogs.com/buchian 阅读全文
posted @ 2021-01-27 16:21 Bonnie_ξ 阅读(313) 评论(0) 推荐(0) 编辑