摘要: # 每次请求一次,然后写文件,这样可以规避多次请求触发反爬虫 r = requests.get('https://www.pearvideo.com/video_1522192') html = r.content.decode("utf-8") print(html) with open("./test.html","w") as f: f.write(html.encode("gb... 阅读全文
posted @ 2019-03-05 20:05 Alfred.Lee 阅读(788) 评论(0) 推荐(0) 编辑
摘要: Django 是从真实世界的应用中成长起来的,它是由 堪萨斯(Kansas)州 Lawrence 城中的一个 网络开发小组编写的。 它诞生于 2003 年秋天,那时 Lawrence Journal-World 报纸的 程序员 Adrian Holovaty 和 Simon Willison 开始用 阅读全文
posted @ 2019-03-05 19:58 Alfred.Lee 阅读(327) 评论(0) 推荐(0) 编辑
摘要: 生成Django项目django-admin startproject mysite启动服务python manage.py runserver本地化中间件'django.mididdleware.locale.LocaleMiddleware',#创建子应用python manage.py sta 阅读全文
posted @ 2019-03-05 19:14 Alfred.Lee 阅读(177) 评论(0) 推荐(0) 编辑