node-crawler 是一个轻量级的node.js爬虫工具,兼顾了高效与便利性,支持分布式爬虫系统,支持硬编码,支持http前级代理。
node-crawler 完全由nodejs写成,天生支持非阻塞异步IO,为爬虫的流水线作业机制提供了极大便利。同时支持对 DOM 的快速选择,对于抓取网页的特定部分的任务可以说是杀手级功能,无需再手写正则表达式,提高爬虫开发效率。
cheerio中文文档: https://www.jianshu.com/p/629a81b4e013
cheerio是jquery核心功能的一个快速灵活而又简洁的实现,主要是为了用在服务器端需要对DOM进行操作的地方
HTML
<script>
seajs.config({
alias: {
'jquery' : "",
'second' : '/dk/js/index_second_wap.js' // 第二屏JS
},
preload: ['jquery']
});
seajs.use('/dk/js/index_wap.js'); // 页面入口JS
</script>
页面入口JS: /dk/js/index_wap.js
define(function(require, exports, modules) {
// 公共模块
var $ = require("jquery");
var t = require("tools");
$(document).ready(function() {
// 异步加载第二屏JS依赖后执行相关代码
require.async('second',function(second){
second('dk_home');
});
});
});
// 音频播放
audioPlayFragment.init(window.dk_audio_config);
插件作者地址:https://github.com/sxei/pinyinjs/
一个实现汉字与拼音互转的小巧web工具库,另外还包含一个非常非常简单的JS版拼音输入法。
演示地址:http://demo.haoji.me/pinyinjs/
支持多音字演示:http://demo.haoji.me/pinyinjs/polyphone.html
更多详细介绍:http://blog.haoji.me/pinyinjs.html
本工具的优点:
// 输入框 ID: correctionTextarea
keyboard(document.getElementById('correctionTextarea')).init();
.app_containor {
height: 100%;
box-sizing: border-box;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
img {
width: 100%;
display: block;
// 解决 img 图像地址为 base64 格式数据时,在ios浏览器上不能长按下载图片问题
-webkit-touch-callout:default;
}