文章分类 - python
摘要:https://github.com/hashjenny/SpiderBuf
阅读全文
摘要:点击查看代码 import random # 双色球 # 红球6个,1-33之间的整数,不重复 # 蓝球1个,1-16之间的整数, # 1、随机产生一个列表,6个红球,1个蓝球 # list1 = [] # # while len(list1) < 6: # n1 = random.randint(
阅读全文
摘要:一个小球从100米高度掉下,每次弹起原高度的一半, 计算:总共弹起多少次(最小弹起高度为0.01米) 总共走了多少米? 点击查看代码 height = 100 count = 0 s = height while height / 2 > 0.01: height = height / 2 coun
阅读全文
摘要:点击查看代码 # 练习:一张纸的厚度是0.01毫米,对折多少次超过珠穆朗玛峰(8848米) n = 0.01 / 1000 count = 0 while n <= 8848: count += 1 n *= 2 print(n, count)
阅读全文
摘要:点击查看代码 total_seconds = int(input("输入总秒数:")) hour = total_seconds // 3600 second = total_seconds % 60 minute = total_seconds // 60 % 60 print("时:", hou
阅读全文
摘要:第一种写操作 点击查看代码 import csv with open('666.csv', 'w', newline='', encoding='utf-8') as f: writer = csv.writer(f) writer.writerow(['班级', '成绩', ]) writer.w
阅读全文
摘要:点击查看代码 1.id定位 <div id="db-global-nav" class="global-nav"> div = tab.ele('#db-global-nav') 2.class定位 div = tab.ele('.global-nav') 3.3.其他属性定位 @属性名=属性值 #
阅读全文
摘要:点击查看代码 安装 pip install DrissionPage pip install -i https://pypi.tuna.tsinghua.edu.cn/simple DrissionPage 卸载pip uninstall DrissionPage 查看版本pip show dris
阅读全文
摘要:点击查看代码 import requests import os # 下图片功能 def down_img(url, zid): if not os.path.exists(zid): os.makedirs(zid) headers = { "user-agent": "Mozilla/5.0 (
阅读全文
摘要:方法一走登录验证码逻辑,搞定验证码和一个变化的参数,练技术 点击查看代码 import requests from lxml import etree session = requests.Session() url = 'https://www.spiderbuf.cn/playground/e0
阅读全文
摘要:点击查看代码 import requests from lxml import etree login_url = 'https://www.spiderbuf.cn/playground/e01/login' headers = { "User-Agent": "Mozilla/5.0 (Wind
阅读全文
摘要:点击查看代码 import requests from lxml import etree url = 'https://www.spiderbuf.cn/playground/s08' headers = { "user-agent": "Mozilla/5.0 (Windows NT 10.0;
阅读全文
摘要:点击查看代码 import requests from lxml import etree url = 'https://www.spiderbuf.cn/playground/s06' headers = { "user-agent": "Mozilla/5.0 (Windows NT 10.0;
阅读全文
摘要:点击查看代码 import requests from lxml import etree import os if not os.path.exists('./美图'): os.makedirs('./美图') url = 'https://www.spiderbuf.cn/playground/
阅读全文
摘要:点击查看代码 import requests from lxml import etree headers = { "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gec
阅读全文
摘要:点击查看代码 import requests from lxml import etree url = 'https://www.spiderbuf.cn/playground/s03' headers = { "user-agent": "Mozilla/5.0 (Windows NT 10.0;
阅读全文
摘要:点击查看代码 import requests from lxml import etree url = 'https://www.spiderbuf.cn/playground/s02' headers = { "user-agent": "Mozilla/5.0 (Windows NT 10.0;
阅读全文
摘要:2句话 1.先用sesssion发一次首页请求会得到cookie 2.再用session发登录请求,搞定
阅读全文
摘要:怎么拿16611138,辅助网站https://regex101.com/ 点击查看代码 function save() { $.post("single_video_save.jsp", {id:16611138, duration:total, studylong:studylong, posi
阅读全文

浙公网安备 33010602011771号