摘要: 一:爬虫类型 定向:指定网站爬取 非定向:仍意网站爬取 二:简单流程 下载网页 requests模块 筛选特定标签 beautfulsoup/正则表达式 三:BeautifulSoup模块介绍 1.name属性,标签名称 2.attr属性,获取标签的所有标签属性,类型字典 3.children,所有 阅读全文
posted @ 2019-07-11 11:23 JuiceWoo 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 一:数据库创建,增删改查 数据库操作 create database db_name; drop database db_name; create database db_name if not exists db_name; show databases; show create database 阅读全文
posted @ 2019-07-11 09:51 JuiceWoo 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 Request的五种请求方式 方法 说明 requests.request() 构造一个请求,支撑以下各方法的基础方法 requests.get() 获取HTML网页的主要方法,对应于HTTP的GET requests.head() 获取HTML网页头信息的方法,对应于HTTP的HEA 阅读全文
posted @ 2019-04-29 15:00 JuiceWoo 阅读(238) 评论(0) 推荐(0) 编辑
摘要: https://docs.python.org/3.6/library/itertools.html 一无限迭代器: count() start, [step] start, start+step, start+2*step, ... count(10) --> 10 11 12 13 14 ... 阅读全文
posted @ 2019-04-26 09:27 JuiceWoo 阅读(625) 评论(0) 推荐(1) 编辑
摘要: 一:python官方文档 https://docs.python.org/3.6/library/stdtypes.html#set-types-set-frozenset 二:集合概念 集合是无序的 集合是无重复元素的 一:add() 会改变原有集合 1 >>> s = set('HackerRa 阅读全文
posted @ 2019-04-25 12:09 JuiceWoo 阅读(967) 评论(0) 推荐(0) 编辑
摘要: https://www.hackerrank.com/challenges/py-set-discard-remove-pop/forum 知识点: *list:将list中的值取出,取出的数据大小是列表的长度,不是一个数据(*[1,2,3,4,5,]=1,2,3,4,5) (*input().sp 阅读全文
posted @ 2019-04-19 08:29 JuiceWoo 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 该模块首先提供了三个便捷的方法:wrap,fill和decent,也提供了TextWrapper类 textwrap.wrap(text,[width[,…]]) 这个方法是将一个字符串按照width的宽度进行切割,切割后返回list import textwrap sample_text = '' 阅读全文
posted @ 2019-04-06 21:41 JuiceWoo 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 一:str.isalnum() ,str.isalpha(),str.isdigit() ,str.islower() ,str.isupper() 1.str.isalnum() This method checks if all the characters of a string are al 阅读全文
posted @ 2019-04-06 17:17 JuiceWoo 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 一:any与all函数 函数信息表格 函数原型 all(iterable) 参数解释 iterable 可迭代对象,参数不可为空,但iterable可空。 返回值 <class 'bool'> True 或 False。 函数说明 当 iterable中所有元素为 True 时,则返回 True 。 阅读全文
posted @ 2019-04-06 16:13 JuiceWoo 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 一:引入方式 1.声明变量时不用声明变量类型. 全都使用var关键字; 2.函数声明 funciton method_name(){} 3.声明变量时 可以不用var. 如果不用var 那么它是全局变量 4. 注释 支持多行注释和单行注释. /* */ // 5.JavaScript语言中代表特定含 阅读全文
posted @ 2019-03-29 09:07 JuiceWoo 阅读(183) 评论(0) 推荐(0) 编辑