摘要: import requests #导入 requests 包 先看请求的方法是什么,比如 get,proct然后有些内容是通过异步加载的,所有我们要找到异步加载的文件 ,异步加载:执行过程同时加载查找的方法是 ,检查,找到网络 ,点XHR 就可以看到异步数据,,请求标头有 X-Requested-W 阅读全文
posted @ 2022-09-09 20:10 python,菜鸟 阅读(54) 评论(0) 推荐(0)
摘要: import datetime import random import time from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver 阅读全文
posted @ 2022-09-09 19:53 python,菜鸟 阅读(66) 评论(0) 推荐(0)
摘要: # from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By from lxml import et 阅读全文
posted @ 2022-09-09 19:48 python,菜鸟 阅读(81) 评论(0) 推荐(0)
摘要: #3156874915import requests from requests import post from json import dumps from re import findall#作者:小辉 # xiong xiao hui #爬取某米有品的手机信息 def get_content 阅读全文
posted @ 2022-09-06 18:39 python,菜鸟 阅读(129) 评论(0) 推荐(0)
摘要: 京东价格爬取为空,正则/beautifulsoup/lxml都获取不到价格信息 原因:由于网页html动态加载了数据,所以在检查模式下能看到价格,但是实际上用正则/beautifulsoup/lxml都获取不到价格信息。 解决: https://p.3.cn/prices/mgets?skuIds= 阅读全文
posted @ 2022-09-04 20:48 python,菜鸟 阅读(197) 评论(0) 推荐(0)
摘要: import re import timeimport requests from lxml import etree作者:小辉 #爬某豆瓣读书 Top 250 #浏览器的代理 #在网址上输入about://version 浏览器的代理 cz={'User-Agent':'Mozilla/5.0 ( 阅读全文
posted @ 2022-08-31 18:55 python,菜鸟 阅读(58) 评论(0) 推荐(0)
摘要: import datetime import random import tkinter as tk import time class chas_lp(): def __init__(self): self.tr=tk.Tk() self.tr.title('点名') self.tr.geomet 阅读全文
posted @ 2022-08-20 22:23 python,菜鸟 阅读(68) 评论(0) 推荐(0)
摘要: i'先定义一个列表' ic = { '语文': 99, '数学': 789, '英语': 98 } def ghj(qwe): '定义一个空列表,来储放最大值' x=[] for v in qwe.values(): x.append(v) cvb=max(x) '变量储存最大值' for k,v 阅读全文
posted @ 2022-04-07 20:47 python,菜鸟 阅读(79) 评论(0) 推荐(0)
摘要: 字符串 asd="123456789" #取双数 print(asd[1::2]) #取单数 print(asd[0::2]) #到7就不取了 print(asd[1:7:2]) #倒着取 print(::-1) 输入一个字符串打印输出的奇数 asd=input() zxc="" for i in 阅读全文
posted @ 2022-03-29 20:51 python,菜鸟 阅读(43) 评论(0) 推荐(0)
摘要: #示范没删除的边距 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" c 阅读全文
posted @ 2022-03-26 16:03 python,菜鸟 阅读(42) 评论(0) 推荐(0)