V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  gwy15  ›  全部回复第 11 页 / 共 11 页
回复总数  206
1 ... 2  3  4  5  6  7  8  9  10  11  
另外提供自动生成的字幕
https://c-t.work/s/c6ef099beefe4f
复制粘贴:
1st -> 1:33
-> when you should commit() your database session
2nd -> 7:20
-> three attributes of the session you probably don't know about (new, deleted, dirty) sounds great for all tracking of changes to objects
3rd -> 11:08
-> related to 2nd regarding when these 3 lists are cleaned and when the db session is cleared in Flask SQLAlchemy; remove() method of the session; how does it affect long-running tasks (e.g celery); be aware of memory usage
4th -> 14:09 -> nice way for handling db.session.remove() and keeping clean the session via context manager.
你这个问题是直接用 r.text 包含一个隐式 decode,如果 requests 没有成功猜对编码会直接抛异常。需要手动解码的情况,采用 bytes = r.content.decode('utf8').encode('utf8')

另外如果 utf8,gbk,Windows-1254 都失败,可以尝试一下 GB18030,或者拷贝出来原值找个猜测解码的网站
2019-11-06 20:38:20 +08:00
回复了 gowk 创建的主题 程序员 请大家推荐一个 Go 相关的域名
如果要备案就阿里云(万网)吧,不然 namesilo
2019-11-06 18:54:31 +08:00
回复了 hjq98765 创建的主题 Python Python 的 json 包好像有个小 bug?
看一下 cc['y'].__class__,不一定是 int
2019-11-06 14:03:28 +08:00
回复了 uti6770werty 创建的主题 Python 如何屏蔽 pyppeteer 的一些日志输出?
Launcher(options={'logLevel': logging.WARNING})
1 ... 2  3  4  5  6  7  8  9  10  11  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2647 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 19ms · UTC 15:41 · PVG 23:41 · LAX 08:41 · JFK 11:41
Developed with CodeLauncher
♥ Do have faith in what you're doing.