
python 库
python库的介绍
shiyu_mj
这个作者很懒,什么都没留下…
展开
-
python deque
python deque1.创建deque序列:from collections import dequed=deque()deque里边的形式是列表形式append() ,从右端添加元素appendleft(),从左端添加元素extend(),从右端逐个添加可迭代对象extendleft(),从左端逐个添加可迭代对象pop(),移除列表中的一个元素(默认最右端的一个元素),并且返回该元素的值(与list同),如果没有元素,将会报出IndexErrorpopleft(),移除列原创 2022-04-15 08:20:57 · 1249 阅读 · 0 评论 -
xpath简介
简要实现xpath基础功能# -*- coding: utf-8 -*-"""Created on Sat Jan 1 15:38:11 2022@author: shiyu"""import tkinterimport requestsfrom lxml import etreeurl='https://www.bilibili.com/v/popular/all?spm_id_from=333.1007.0.0'headers={'user-agent':'Mozilla/5原创 2022-01-02 11:20:53 · 281 阅读 · 0 评论 -
pygame使用
基本功能初始化:pygame.init()设置窗口:screen = pygame.display.set_mode((400,400))设置标题:pygame.display.set_caption(‘hello world’)设置字体:f =pygame.font.Font(‘C:/Windows/Fonts/simhei.ttf’,50)原创 2022-01-14 13:10:32 · 2193 阅读 · 0 评论 -
python pymysql基础操作
# -*- coding: utf-8 -*-"""Created on Sun Jan 2 17:20:35 2022@author: shiyu"""import pymysqlimport tkinter#查看版本,创建数据库def button_1(s,pos): b=tkinter.Button(win,text=s,command=lambda:fun_1()) b.grid(row=pos[0],column=pos[1],sticky='w')d原创 2022-01-02 20:11:52 · 540 阅读 · 0 评论 -
requests
1.获取状态码html.status_code原创 2022-01-20 11:15:45 · 159 阅读 · 0 评论 -
selenium 使用
引用from selenium import webdriverfrom time import sleepdriver = webdriver.Edge()driver.get('https://cn.bing.com/')sleep(5)driver.quit()元素定位find_element_by_id()find_element_by_name()find_element_by_class_name()find_element_by_tag_name()find_ele原创 2022-01-19 11:53:59 · 138 阅读 · 0 评论