杂货铺
Remaining_songs
这个作者很懒,什么都没留下…
展开
-
解决pip下载超时、等报错问题
pip问题解决原创 2022-08-22 17:16:12 · 673 阅读 · 0 评论 -
python 字符编码转换
任意:(1)(2)(1)response.body.encoding = response.body.apparent_encoding(2)response.encoding = response.apparent_encoding乱码1html = requests.get(url,headers=headers)html.encoding = 'utf8'html = html.textprint(html)乱码2response.content.decode('gbk',e原创 2021-10-11 10:44:45 · 109 阅读 · 0 评论 -
自定义十三位时间戳减去任意时间
timeStamp = int(1620316800000) # 十三位时间戳now02 = time.strftime('%Y-%m-%d',time.localtime(timeStamp/1000))dt = datetime.datetime.strptime(now02, "%Y-%m-%d") out_date = (dt + datetime.timedelta(days=-1)).strftime("%Y-%m-%d")备注:想减去多少,或者加多少days自行修改(我这里减一原创 2021-05-21 15:31:55 · 432 阅读 · 0 评论