摘要: "知乎专栏" 获取整个网页的内容 加入bs4 bs4是一个非常好的解析网页的库。先看bs4里面最常用的几个BeautifulSoup对象的方法。主要是通过HTML的标签和标签里面的参数来定位,然后用特定方法提取数据。 这里提取教职员工的人员链接和姓名。 存储 阅读全文
posted @ 2017-02-11 20:43 你我之间 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Databases Database Management with Flask SQLAlchemy hello.py: Database configuration Model Definition 阅读全文
posted @ 2016-11-11 08:30 你我之间 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Web Forms Cross Site Request Forgery (CSRF) Protection hello.py: Flask WTF configuration Form Classes hello.py: Form class definition hello.py: Route 阅读全文
posted @ 2016-11-09 09:38 你我之间 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Templates The Jinja2 Template Engine templates/index.html: Jinja2 template templates/user.html: Jinja2 template Rendering Templates Variables Jinja2 r 阅读全文
posted @ 2016-11-07 10:20 你我之间 阅读(148) 评论(0) 推荐(0) 编辑
摘要: https://www.zhihu.com/question/24736400 http://www.cnblogs.com/bananaplan/p/Sublime Text 3 Powerful.html 1、ConvertToUTF8 支持 GBK, BIG5, EUC KR, EUC JP, 阅读全文
posted @ 2016-11-07 08:36 你我之间 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Basic Application Structure A Complete Application The Request Response Cycle Create another git branch Application and Request Contexts Flask context 阅读全文
posted @ 2016-11-06 09:43 你我之间 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Installation Environment 阅读全文
posted @ 2016-11-06 09:41 你我之间 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 创建数据库 配置setting.py windows下如果使用的是virtualenv虚拟环境的话,可能需要安装 , 测试一下是否正常: 同步数据库 创建模型 修改west/models.py 再次同步数据库 Django Shell 增加一个页面,显示所有人员 修改west/views.py 修改 阅读全文
posted @ 2016-11-02 08:21 你我之间 阅读(549) 评论(0) 推荐(0) 编辑
摘要: 初体验 安装 建立工程 运行工程 第一个页面 在mysite/mysite下创建views.py 将urls.py修改为 访问 访问127.0.0.1:8000 增加APP 在mysite/setting.py中添加: 将mysite/urls.py改成: 增加文件west/urls.py 增加文件 阅读全文
posted @ 2016-10-31 15:12 你我之间 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 使用正则表达式 使用BeautifulSoup coding: utf 8 import urllib from bs4 import BeautifulSoup def get_content(url): ''' 获取网页内容 ''' html = urllib.urlopen(url) cont 阅读全文
posted @ 2016-10-29 22:05 你我之间 阅读(248) 评论(0) 推荐(0) 编辑