随笔分类 -  python

摘要:import requests url = 'https://www.douban.com/search?' # req = requests.get(url) headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) 阅读全文
posted @ 2023-04-12 16:24 mingBolg 阅读(71) 评论(0) 推荐(0) 编辑
摘要:# 1.导入 from selenium.webdriver.chrome.service import Service from selenium import webdriver from selenium.webdriver.common.by import By import time # 阅读全文
posted @ 2023-04-11 18:07 mingBolg 阅读(106) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/weixin_48626846/article/details/125564074 阅读全文
posted @ 2023-04-11 13:36 mingBolg 阅读(34) 评论(0) 推荐(0) 编辑
摘要:新版本Selenium代码需要引入: from selenium.webdriver.common.by import By 选择器也变了,而后做如下修改 # inputTag = driver.find_element_by_id("value") # 利用ID查找 # 改为: inputTag 阅读全文
posted @ 2023-04-11 11:10 mingBolg 阅读(103) 评论(0) 推荐(0) 编辑
摘要:安装 selenium 查看谷歌版本 Chrome驱动下载地址(跟谷歌版本一定要对上): http://chromedriver.storage.googleapis.com/index.html 下载好以后 放入项目的根目录 创建文件并安装引入selenium 打开浏览器百度网站 案例 # 1.导 阅读全文
posted @ 2023-04-11 09:54 mingBolg 阅读(21) 评论(0) 推荐(0) 编辑
摘要:import requests from bs4 import BeautifulSoup r = requests.get('https://www.starbucks.com.cn') soup = BeautifulSoup(r.text,'lxml') imgs = soup.select( 阅读全文
posted @ 2023-04-10 16:46 mingBolg 阅读(27) 评论(0) 推荐(0) 编辑
摘要:f = 3 d = 6 # print(f>5 or d>5) # print(not (d>5)) # (f>5) and print(111) #输出 # print( '我是好人%s' % ('哈哈')) # name = input('请输入名字') # print( 'tama d hua 阅读全文
posted @ 2023-04-10 09:23 mingBolg 阅读(18) 评论(0) 推荐(0) 编辑
摘要:from bs4 import BeautifulSoup soup = BeautifulSoup(open('index.html',encoding='utf-8'),'lxml') print(soup) 就可以使用了. 下面是一些用法示例: from bs4 import Beautifu 阅读全文
posted @ 2023-04-10 09:23 mingBolg 阅读(24) 评论(0) 推荐(0) 编辑
摘要:邮箱密码什么的肯定是没有的,点第二个选项 点击后这里就能直接打开了 然后往编辑器里拖此文件就破解了 阅读全文
posted @ 2023-03-29 14:21 mingBolg 阅读(43) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示
主题色彩