01 2023 档案

摘要:代码块 for index, ball in enumerate(balls): print(f'{ball:0>2d}', end=' ') if index == len(balls) - 2: print('|', end=' ') enumerate() enumerate()函数意为循环计 阅读全文
posted @ 2023-01-16 23:32 金九亿 阅读(43) 评论(0) 推荐(0) 编辑
摘要:代码块 red_balls = [x for x in range(1, 34)] selected_balls = sample(red_balls, 6) selected_balls.sort() selected_balls.append(randint(1, 16)) return sel 阅读全文
posted @ 2023-01-15 23:34 金九亿 阅读(139) 评论(0) 推荐(0) 编辑
摘要:代码块 response = requests.get(url=url, headers=headers, params=params) html = etree.HTML(response.text) python request库 requests.get()意为获取网页,对应HTTP中GET方 阅读全文
posted @ 2023-01-14 22:37 金九亿 阅读(286) 评论(0) 推荐(0) 编辑
摘要:代码块 global fileName fileName = '{}.csv'.format(keyword) if not os.path.exists(fileName): with open(fileName, 'w+', encoding='utf-8-sig', newline='') a 阅读全文
posted @ 2023-01-13 22:48 金九亿 阅读(133) 评论(0) 推荐(0) 编辑
摘要:场景 结果 通过阿里云oss直传签名上传文件时报错跨域。 查验 查看OSS资源中,发现通过配置方法直传后,文件实际是上传成功的。 思考与发现 说明这里只是浏览器报跨域错误。 解决办法 做法: ajax将withCredentials属性设置成false。 目的: 设置成跨域不带上cookie 原理可 阅读全文
posted @ 2023-01-12 16:03 金九亿 阅读(937) 评论(0) 推荐(0) 编辑
摘要:layer 弹窗显示表格中的图片。 选用layer.photos 实例化 layer.photos({ photos: '#img_' + id, //0-6的选择,指定弹出图片动画类型,默认随机 anim: 5, }); bug 点击第一次不奏效,第二次点击出现了图片全宽显示在浏览器中。 结果是无 阅读全文
posted @ 2023-01-12 08:34 金九亿 阅读(787) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示