![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python3
我是叫帽帽啊
这个作者很懒,什么都没留下…
展开
-
python3 urllib.request.urlopen() 错误UnicodeEncodeError: 'ascii' codec can't encode characters
代码内容:url = 'https://movie.douban.com/j/search_subjects?type=movie'+ str(tag) + '&sort=recommend&page_limit=20&page_start=' + str(limit)response = urllib.request.urlopen(url, timeout...原创 2018-07-27 20:10:49 · 9267 阅读 · 1 评论 -
python3 sorted()的用法
python3中sorted函数取消了对cmp的支持(为了提高性能),现在Python3中sorted()函数的原型为: sorted(iterable, key=None, reverse=False) Return a new list containing all items from the iterable in ascending order.A custom key fun...原创 2018-10-14 12:53:14 · 7351 阅读 · 0 评论