摘要:
from selenium import webdriver import time #导入时间 #打开谷歌浏览器 driver = webdriver.Chrome() #打开艺龙网站 driver.get("http://www.elong.com/") time.sleep(1) #选择热门城 阅读全文
posted @ 2020-05-23 23:26
Memory荒年
阅读(183)
评论(0)
推荐(0)
摘要:
# 条件判断语句 # home ="America" # if home == "America": # print("Hello,America") # else: # print("Hello,China") #当条件不成立未False是 # home ="China" # if home == 阅读全文
posted @ 2020-05-23 22:59
Memory荒年
阅读(234)
评论(0)
推荐(0)
摘要:
import os print(os.sep) #文件分隔符 print(os.name) #windows系统 print(os.getenv("Path"))#系统环境变量path print(os.getcwd())#当前的文件路径 dirs = "D:\\协助项目游戏中心版本\\特性:3.9 阅读全文
posted @ 2020-05-23 18:51
Memory荒年
阅读(165)
评论(0)
推荐(0)
摘要:
import requests class HttpRequests: # def https_requests(login_url,data,http_method):#调用;提高复用性 # @staticmethod # def https_requests(login_url, data, h 阅读全文
posted @ 2020-05-23 18:48
Memory荒年
阅读(189)
评论(0)
推荐(0)
摘要:
#函数里面的位置参数 # def print_mag(a,b):#位置参数/形参 # '''此函数的作用是完成信息的输出到控制台''' # print("a参数的值:",a) # print("b参数的值:",b) # # print_mag("a:hello","b:python","c:好久不见 阅读全文
posted @ 2020-05-23 18:33
Memory荒年
阅读(195)
评论(0)
推荐(0)
摘要:
# a = 9 # while a < 10: # print("我是while循环!")#死循环 # while a: # print("我是while循环!") # 死循环 #while循环先判断 在执行 执行完毕在判断 根据结果 决定是否执行 还是结束循环 #怎么打破while循环 可以制作条 阅读全文
posted @ 2020-05-23 18:29
Memory荒年
阅读(224)
评论(0)
推荐(0)
摘要:
import requests # def http_requsts(): # login_url = "http://www.tuling123.com/openapi/api" # data = { # "key": "ec961279f453459b9248f0aeb6600bbe", # " 阅读全文
posted @ 2020-05-23 18:27
Memory荒年
阅读(221)
评论(0)
推荐(0)
摘要:
# 类方法之间的调用 return class GirlFriend(): def __init__(self,height,money,name,age):#初始化函数 self.height = height self.money = money self.name = name self.ag 阅读全文
posted @ 2020-05-23 18:26
Memory荒年
阅读(633)
评论(0)
推荐(0)
摘要:
# 实例函数 类里面的函数 >常用的 方法# class GirlFriend():# height = 160# money = 200000# name = "miss 李"# age = 25# #行为特性 >函数 >80%的相似度 跟普通函数 20%的不相似地方:self# # @class 阅读全文
posted @ 2020-05-23 18:25
Memory荒年
阅读(180)
评论(0)
推荐(0)
摘要:
class GirlFriend(): height = 160 money = 200000 name = "miss 李" age = 25 #行为特性 >函数 >80%的相似度 跟普通函数 20%的不相似地方:self def coking(self):#类里面的函数与普通函数的区别 prin 阅读全文
posted @ 2020-05-23 18:24
Memory荒年
阅读(194)
评论(0)
推荐(0)
摘要:
# 类里面的函数# 1.类函数/类方法 @classmethod 通过类名直接调用# 什么时候去定义类方法的?# (1.如果想通过类名.函数名#(2.方法和属性没有直接的关联# 2.实例函数/方法# 3.静态函数/静态方法class GirlFriend(): height = 160 money 阅读全文
posted @ 2020-05-23 18:23
Memory荒年
阅读(229)
评论(0)
推荐(0)
摘要:
class GirlFriend(): height = 160 money = 200000 name = "miss 李" age = 25 #行为特性 >函数 >80%的相似度 跟普通函数 20%的不相似地方:self def coking(self):#类里面的函数与普通函数的区别 prin 阅读全文
posted @ 2020-05-23 18:22
Memory荒年
阅读(212)
评论(0)
推荐(0)

浙公网安备 33010602011771号