02 2021 档案

摘要:待补充 http://www.gaoxiaowang.cn/duanzi/g/fIT2y6HSQN 这个是还没有完成,所以待会要来搞 阅读全文
posted @ 2021-02-22 01:49 阅读(52) 评论(0) 推荐(0) 编辑
摘要:基本用法: # 高性能之协程爬虫 import asyncio # async def fun(url): # print(f"正在请求{url}") # print(f"{url}请求完毕") # return f"{url}你爸爸已经搞定了" # f = fun("http://www.baid 阅读全文
posted @ 2021-02-19 16:53 阅读(94) 评论(0) 推荐(0) 编辑
摘要:arr = ["http://music.163.com/song/media/outer/url?id=1820550501.mp3", "http://music.163.com/song/media/outer/url?id=1820550501.mp3", "http://music.163 阅读全文
posted @ 2021-02-19 00:15 阅读(43) 评论(0) 推荐(0) 编辑
摘要:<div class="video"> <iframe height=180 width=10% src='https://player.youku.com/embed/XMzQzNjc2MTYwNA==' frameborder=0 allowfullscreen=1></iframe> </di 阅读全文
posted @ 2021-02-18 20:47 阅读(56) 评论(0) 推荐(0) 编辑
摘要:# os.path.exists(path) 判断一个目录是否存在 # 2、os.makedirs(path) 多层创建目录 # 3、os.mkdir(path) 创建目录 import os def mkdirs(url): url = "D:/4KSite/fengjing/" if not o 阅读全文
posted @ 2021-02-18 14:51 阅读(101) 评论(0) 推荐(0) 编辑
摘要:基本语法: 属性定位: #找到class属性值为song的div标签 //div[@class="song"] 层级&索引定位: #找到class属性值为tang的div的直系子标签ul下的第二个子标签li下的直系子标签a //div[@class="tang"]/ul/li[2]/a 逻辑运算: 阅读全文
posted @ 2021-02-18 13:52 阅读(72) 评论(0) 推荐(0) 编辑
摘要:爬取小说水浒传 代码例子: # # 先下载需要的包 # pip install bs4 # pip install lxml from bs4 import BeautifulSoup # 小说网 水浒传 url = "http://book.zongheng.com/showchapter/681 阅读全文
posted @ 2021-02-17 00:40 阅读(54) 评论(0) 推荐(0) 编辑
摘要:直接上代码: import re import requests # 创建定长数字,作为一会名字 def creat_fivenum(num,n=5): for i in range(1,10): s=str(num) j=10**i if (int(num/j)==0): for a in ran 阅读全文
posted @ 2021-02-16 23:03 阅读(63) 评论(0) 推荐(0) 编辑
摘要:requests 详细了解一下爬虫 #1爬虫究竟是合法还是违法的? # 在法律上不被禁止 算是中立性 # 2爬虫所带来风险主要体现在以下2个方面: # 爬虫干扰了被访问网站的正常运营; # 爬虫抓取了受到法律保护的特定类型的数据或信息。 # 爬虫的分类 # 通用爬虫:通用爬虫是搜索引擎(Baidu、 阅读全文
posted @ 2021-02-16 16:04 阅读(76) 评论(0) 推荐(0) 编辑
摘要:UA伪装 < >UA检测:门户网站会检测对应请求的载体身份标识,如果是浏览器那就认为是正常用户 headers headers = { 'Accept-Encoding': 'gzip, deflate, sdch', 'Accept-Language': 'en-US,en;q=0.8', 'Us 阅读全文
posted @ 2021-02-16 15:09 阅读(80) 评论(0) 推荐(0) 编辑
摘要:<script> //显示时间 setInterval(function() { var myDate = new Date; var year = myDate.getFullYear(); //获取当前年 var mon = myDate.getMonth() + 1; //获取当前月 var 阅读全文
posted @ 2021-02-15 23:21 阅读(254) 评论(0) 推荐(0) 编辑
摘要:写作不易:我是阿森 不上图了,显得很乱 效果直接看我博客就看到啦 .navbar a:hover{color:#666;text-decoration:underline}.navbar a:link,.navbar a:active,.navbar a:visited{color:#666;tex 阅读全文
posted @ 2021-02-15 22:20 阅读(46) 评论(0) 推荐(0) 编辑
摘要:下载安装一系列问题: G: cd anaconda3/Scripts pip install opencv-python==3.4.1.15 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/opencv-python/ opencv_p 阅读全文
posted @ 2021-02-12 23:53 阅读(42) 评论(0) 推荐(0) 编辑
摘要:地址+包名字, 速度很快的 cp38代表你的python版本 一定要对应 https://pypi.tuna.tsinghua.edu.cn/simple/opencv-python/ http://pypi.doubanio.com/simple/opencv-python https://www 阅读全文
posted @ 2021-02-10 01:00 阅读(399) 评论(0) 推荐(0) 编辑
摘要:import pyaudio import wave def get_audio(filepath): aa = str(input("是否开始录音? (y/n)")) if aa == str("y") : CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNEL 阅读全文
posted @ 2021-02-09 23:18 阅读(69) 评论(0) 推荐(0) 编辑
摘要:爬取字体:网址一 网址二 网址三 爬取图片:网址一 网址二 网址三 网址四 网址五 地址六 阅读全文
posted @ 2021-02-07 02:39 阅读(66) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示