2020
12-05
12-05
python 模拟登陆github的示例
#-*-coding:utf-8-*-#@Author:CriseLYJ#@Date:2020-08-1412:13:11importreimportrequestsclassGithubLogin(object):def__init__(self,email,password):#初始化信息self.headers={'User-Agent':'Mozilla/5.0(Macintosh;IntelMacOSX10_14_2)AppleWebKit/537.36(KHTML,likeGecko)Chrome/71.0.3578.98Safari/537.36','Referer':'https://github.com/','Host':'github.c...
继续阅读 >
小编之前向大家讲解了很多关于字符串的知识,大家也都知道字符串在python中的作用很大,那你知道在python中用于接收字符串等输入,让用户可与之交互以输入或操作字符串数据的对象是什么吗?是 pythontkinter中的Entry控件,下面我们来一看看吧。1、Entry:用于接受用户Entry小窗口部件单行文本字符串2、使用Entry控件的语法w=Entry(master,option,...)注意:master 参数为其父控件,就是用来放置这个Entry的控...
requests相比urllib,第三方库requests更加简单人性化,是爬虫工作中常用的库requests安装初级爬虫的开始主要是使用requests模块安装requests模块:Windows系统:cmd中:pipinstallrequestsmac系统中:终端中:pip3installrequestsrequests库的基本使用importrequestsurl='https://www.csdn.net/'reponse=requests.get(url)#返回unicode格式的数据(str)print(reponse.text)响应对象response的⽅法response.text返...
记得刚学python那会,作过一个飞机大战小项目,这个项目非常经典,可以帮助初学者提高动手能力,今天把它分享出来。一、项目介绍先放几张图片二、项目实现1.首先安装库pipinstallpygame2.主要python代码importpygamefrompygame.localsimport*importrandom#https://blog.csdn.net/qq_36079986/article/details/110395731classHeroPlane(object):#创建一个飞机的英雄类def__init__(self,screen_temp):#始化方法self.x...