文章分类 -  python

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