上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 30 下一页
摘要: 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 3ξ 阅读(39) 评论(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 3ξ 阅读(53) 评论(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 3ξ 阅读(98) 评论(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 3ξ 阅读(69) 评论(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 3ξ 阅读(47) 评论(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 3ξ 阅读(59) 评论(0) 推荐(0) 编辑
摘要: requests 详细了解一下爬虫 #1爬虫究竟是合法还是违法的? # 在法律上不被禁止 算是中立性 # 2爬虫所带来风险主要体现在以下2个方面: # 爬虫干扰了被访问网站的正常运营; # 爬虫抓取了受到法律保护的特定类型的数据或信息。 # 爬虫的分类 # 通用爬虫:通用爬虫是搜索引擎(Baidu、 阅读全文
posted @ 2021-02-16 16:04 3ξ 阅读(72) 评论(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 3ξ 阅读(74) 评论(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 3ξ 阅读(248) 评论(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 3ξ 阅读(45) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 30 下一页