摘要: 解决代码: import sys import io sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf-8') #改变标准输出的默认编码 阅读全文
posted @ 2021-02-21 18:01 博二爷 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 # # -*- coding:utf-8 -*- 2 from lxml import etree 3 import re 4 import requests #导入requests包 5 import 爬取法律法规.SQL as SQL 6 7 def Get_urls(start,e 阅读全文
posted @ 2021-02-21 17:37 博二爷 阅读(650) 评论(1) 推荐(0) 编辑
摘要: 转自:https://www.cnblogs.com/awakenedy/articles/9182036.html 一、datetime模块介绍 (一)、datetime模块中包含如下类: 类名功能说明 date 日期对象,常用的属性有year, month, day time 时间对象 date 阅读全文
posted @ 2021-02-21 16:17 博二爷 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 a = [datetime.date(2010, 10, 20), 1, 4, datetime.date(2013, 10, 20)] 2 maz_=max(d for d in a if isinstance(d, datetime.date)) 3 print(maz_) 阅读全文
posted @ 2021-02-21 16:00 博二爷 阅读(1073) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 body { 2 background:#fff; 3 min-height:100%; 4 height:100%; 5 color:#314659!important; 6 font-family:Lato,"PingFang SC","Microsoft YaHei",sans-s 阅读全文
posted @ 2021-02-21 11:15 博二爷 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 大小比较代码: 1 import datetime 2 import time 3 #将日期字符串转为时间再比较,time,datetime,str 4 def valid_date(timestr): 5 #获取当前时间日期 6 nowTime_str = datetime.datetime.no 阅读全文
posted @ 2021-02-21 10:46 博二爷 阅读(1046) 评论(0) 推荐(0) 编辑