随笔分类 -  python实战

没有撤退可言!
摘要:import requests import re #导入界面模块 as(缩写) tk import tkinter as tk #导入浏览器模块 import webbrowser url = 'http://qmaile.com/' responed = requests.get(url) #自 阅读全文
posted @ 2020-02-19 10:41 故事的小黄花丶 阅读(820) 评论(0) 推荐(0)
摘要:无反爬 import requests #调用requests模块 import re #调用re 正则表达式 from urllib.request import urlretrieve #调用下载模块 import os #调用系统模块 '''分析网页''' #获取页面源代码 html = re 阅读全文
posted @ 2019-12-30 08:55 故事的小黄花丶 阅读(322) 评论(0) 推荐(0)
摘要:模拟浏览器访问-User-Agent: import urllib2 #User-Agent 模拟浏览器访问 headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, l 阅读全文
posted @ 2019-12-27 00:22 故事的小黄花丶 阅读(1018) 评论(0) 推荐(0)
摘要:import re re.search(r'([1]\d\d|2[0-4]\d|25[0-5])','192') #re.search(r'([01]\d\d)','1XX') #[01] \d \d # 1 0-9 0-9 #re.search(r'(2[0-4]\d)','2XX') #2 [0 阅读全文
posted @ 2019-12-25 21:56 故事的小黄花丶 阅读(277) 评论(0) 推荐(0)
摘要:#导入urllib包里的request请求模块import urllib.request#导入urllib包里的解析模块 import urllib.parse import json content = input("请输入需要翻译的内容:") #url = 'http://fanyi.youda 阅读全文
posted @ 2019-12-24 15:39 故事的小黄花丶 阅读(229) 评论(0) 推荐(0)