吃瓜的瓜农

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2019年5月27日

摘要: http%3A//www.myctvs.com/blog 1.html 类似与这种中间空了一个空格,在html中显示是没有问题的,但是实际的地址 是: http%3A//www.myctvs.com/blog%201.html -->>这样的是有问题的可以访问的地址是-->>" https//www 阅读全文
posted @ 2019-05-27 16:36 吃瓜的瓜农 阅读(183) 评论(0) 推荐(0) 编辑

2019年4月27日

摘要: python2 with open 没有 encoding 这个参数 会报错, 可以 import io with io.open(path,"") as f: 这样就ok 或者是读取的时候 加上 encoding 阅读全文
posted @ 2019-04-27 18:33 吃瓜的瓜农 阅读(2130) 评论(0) 推荐(0) 编辑

2019年4月12日

摘要: fetch_type='js' 运行 js代码 阅读全文
posted @ 2019-04-12 16:05 吃瓜的瓜农 阅读(104) 评论(0) 推荐(0) 编辑

2019年4月10日

摘要: url_list = select.xpath("//ul/li/a[contains(text(),'新闻中心' )]/../../li/a/@href | //ul/li/a[contains(text(),'首页' )]/../../li/a/@href | //ul/li/a[contain 阅读全文
posted @ 2019-04-10 16:41 吃瓜的瓜农 阅读(1142) 评论(0) 推荐(0) 编辑

2019年4月9日

摘要: HTTPS请求进行SSL验证或忽略SSL验证才能请求成功,忽略方式为 verify=False 阅读全文
posted @ 2019-04-09 10:37 吃瓜的瓜农 阅读(134) 评论(0) 推荐(0) 编辑

2019年3月20日

摘要: import time,datetimetimeArray = time.localtime(1552867907)#1970秒数print(timeArray,"timeArray")otherStyleTime = time.strftime("%Y-%m-%d %H:%M:%S", timeA 阅读全文
posted @ 2019-03-20 15:01 吃瓜的瓜农 阅读(164) 评论(0) 推荐(0) 编辑

2019年3月13日

摘要: 创建 foreign key 外键,指向另一个表 PRIMARY KEY 主键 ALTER TABLE OrderItems ADD CONSTRAINT FK_OrderItems_Orders FOREIGN KEY(order_num) REFERENCES Orders (order_num 阅读全文
posted @ 2019-03-13 09:03 吃瓜的瓜农 阅读(112) 评论(0) 推荐(0) 编辑

2019年2月11日

摘要: import htmlimport etree selector = etree.HTML(res) url_h2 = selector.xpath("//a[@_stat='video:poster_v']/../h2")[0]url_div = selector.xpath("//a[@_sta 阅读全文
posted @ 2019-02-11 22:59 吃瓜的瓜农 阅读(1032) 评论(0) 推荐(0) 编辑

摘要: data 是传过去的值 过滤器 | {{data.name | safe}} 阅读全文
posted @ 2019-02-11 22:55 吃瓜的瓜农 阅读(530) 评论(0) 推荐(0) 编辑

2019年2月5日

摘要: from lxml import etree info = f.read() # requests.get().text # print(info) selector=etree.HTML(info) #将源码转化为能被XPath匹配的格式 xx=selector.xpath("//img[@cla 阅读全文
posted @ 2019-02-05 17:52 吃瓜的瓜农 阅读(99) 评论(0) 推荐(0) 编辑