摘要: NodeJS简介 Node.js uses an event driven,non blocking I/O model 非阻塞I/O 阻塞:I/O时进程休眠等待I/O完成后进行下一步 非阻塞:I/O时函数立即返回,进程不等待I/O完成 事件驱动 I/O等异步操作结束后通知 观察者模式 CPU密集: 阅读全文
posted @ 2018-12-05 21:57 cicarius 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 流程框架 1. 抓取单页内容 利用requests请求目标站点,得到单个网页HTML代码,返回结果。 2. 正则表达式分析 根据HTML代码分析得到电影的名称、主演、上映时间、评分、图片链接等信息。 3. 保存至文件 通过文件的形式将结果保存,每一部电影一个结果一行Json字符串。 4. 开启循环及 阅读全文
posted @ 2018-12-05 15:19 cicarius 阅读(290) 评论(0) 推荐(0) 编辑
摘要: Introduction One of the easiest way of increasing the responsiveness of your server and guarding against out of memory errors in applications is to ad 阅读全文
posted @ 2018-12-05 09:37 cicarius 阅读(275) 评论(0) 推荐(0) 编辑