python爬取知乎live_爬取个人知乎收藏夹内容生成网站
知乎个人收藏
栏目总览
{{ description }}
That's all!
{{ modalMessage }}
© 2017 treelake.
Vue.component('my-carousel', {
template: '
'
})
Vue.component('my-ul', {
template: '
',
props: ['items'],
methods: {
changeLimit() {
if (this.limitFrom > this.items.length - this.limitNum) {
this.limitFrom = 0;
} else {
this.limitFrom += this.limitNum;
}
if (this.limitFrom == this.items.length) {
this.limitFrom = 0
}
console.log(this.limitFrom)
},
simpleContent(msg) {
this.$dispatch('child-msg', msg)
// 使用 $dispatch() 派发事件,事件沿着父链冒泡
},
},
data() {
return {
limitNum: 5,
limitFrom: 0,
}
},
events: {
'parent-msg': function () {
this.changeLimit()
}
},
})
Vue.component('my-card', {
template: '
{{ collection.ctitle }}
换一换 ',
props: ['collection'],
methods: {
notify: function () {
this.$broadcast('parent-msg')
// 使用 $broadcast() 广播事件,事件向下传导给所有的后代
}
}
})
var shuju, answer;
new Vue({
el: '#app',
data: {
description: '',
visible: false,
// ctitle: '',
allqa: [],
collection: {
'clist': [],
'ctitle': '',
},
left: [],
right: [],
modalMessage: '旧时光回忆完毕!',
modalTitle: 'Welcome!',
rawHtml: ' treelake '
},
methods: {
show() {
this.visible = true;
},
showLeave() {
this.rawHtml = '';
this.modalMessage = '旧时光回忆完毕!';
this.show();
}
},
events: {
'child-msg': function (msg) {
this.$http.jsonp('/find' + msg.answer_url, {}, { // 单文件测试:http://localhost:5000/find
headers: {},
emulateJSON: true
}).then(function (response) {
// 这里是处理正确的回调
answer = response.data;
this.rawHtml = answer.answer;
}, function (response) {
// 这里是处理错误的回调
console.log(response);
});
this.modalMessage = '';
this.modalTitle = msg.title;
this.show();
}
},
ready: function () {
this.$http.jsonp('/collections', {}, { // 单文件测试 http://localhost:5000/collections/
headers: {},
emulateJSON: true
}).then(function (response) {
// 这里是处理正确的回调
shuju = response.data
for (i in shuju) {
this.description += (shuju[i].ctitle + ' ');
// console.log(shuju[i])
}
// this.ctitle = shuju[0].ctitle
// this.collection = shuju[0]
this.allqa = shuju
half = parseInt(shuju.length / 2) + 1
this.left = shuju.slice(0, half)
this.right = shuju.slice(half, shuju.length)
console.log(this.collection)
}, function (response) {
// 这里是处理错误的回调
console.log(response);
});
}
})
#list {
padding: 10px
}
#list li {
margin-bottom: 10px;
padding-bottom: 10px;
}
.jumbotron img {
width: 100%;
}
.author-badge {
width: 38px;
height: 38px;
border-radius: 6px;
display: inline-block;
}
#inner-content img {
width: 100%;
}
python爬取知乎live_爬取个人知乎收藏夹内容生成网站相关推荐
- 哪些知乎收藏夹关注数超过一万?
我们先看榜单共计432个收藏夹关注数超过一万,看完榜单之后看抓取思路. 以下格式按照(关注人数,收藏夹链接),从高到低降序排序. 102884 知乎经典问题 - 收藏夹 76771 醍醐灌顶 - 收藏 ...
- python爬取知乎live_【实战视频教程】使用scrapy爬知乎live信息
[公众号:大邓python]用scrapy爬取知乎live_腾讯视频https://v.qq.com/x/cover/u0551wi70m1/u0551wi70m1.html 一.知乎Live抓包分析 ...
- python知乎爬虫收藏夹_Python爬取知乎问题收藏夹 爬虫入门
简介 知乎的网站是比较好爬的,没有复杂的反爬手段,适合初学爬虫的人作为练习 因为刚刚入门python,所以只是先把知乎上热门问题的一些主要信息保存到数据库中,待以后使用这些信息进行数据分析,爬取的网页 ...
- python xpath爬取新闻标题_爬取知乎热榜标题和连接 (python,requests,xpath)
用python爬取知乎的热榜,获取标题和链接. 环境和方法:ubantu16.04.python3.requests.xpath 1.用浏览器打开知乎,并登录 2.获取cookie和User-Agen ...
- python公众号推荐 知乎_爬取公众号及知乎专栏文章的标题链接的方法汇总
记一次最近的工作内容(奇怪的任务增加了)因为Python是去年接触并且没有过爬虫的实际学习操作,所以在出现"要收集文章标题链接"的任务是还是有点难以下手的.虽然有了解过爬虫可以方便 ...
- python爬虫实战(一)--爬取知乎话题图片
原文链接python爬虫实战(一)–爬取知乎话题图片 前言 在学习了python基础之后,该尝试用python做一些有趣的事情了–爬虫. 知识准备: 1.python基础知识 2.urllib库使用 ...
- python有道翻译-使用python2爬取有道翻译
爬虫的核心思想:模拟浏览器正常访问服务器,一般情况只要浏览器能访问的,都可以爬,如果被反爬,则考虑反复测试添加Request Header数据,知道可以爬取为止. 反爬思路目前知道的有:User-Ag ...
- 爬虫实战3:模拟登陆知乎并爬取任意帖子数据
刚学爬虫时,看到一篇文章硬核破解知乎登陆,心潮澎湃,真男人!符合我的胃口!哼哧哼哧的立刻安排! (半个小时过后) 似乎我是弱智?很多看不懂?(百度乱搜中-)恩还有种简单的?sel ...
- monthy python爬虫_Python爬虫DOTA排行榜爬取实例(分享)
Python爬虫DOTA排行榜爬取实例(分享) 1.分析网站 打开开发者工具,我们观察到排行榜的数据并没有在doc里 doc文档 在Javascript里我么可以看到下面代码: ajax的post方法 ...
最新文章
- html文本框对齐 display:block,html – 在所有浏览器中垂直对齐标签和文本框
- ffmpeg命令 音频文件格式转换
- html dom对象简写,js参考手册-html dom对象
- 同一台服务器上面安装多个mysql数据库
- 多线程之线程池的应用
- 整型数据在内存中的存放形式
- Redis学习之Sentinel(四)
- 阿里Java编程规约(集合)
- Docker是传统的应用发布管理的终结者么?
- WordPress更改“固定链接”后 页面404原因及解决方法(Nginx版)
- 华为云专线接入方案介绍
- Python03 拉格朗日插值法 牛顿插值法(附代码)
- 通过IE私有滤镜让IE6 7 8支持背景透明,内容不透明效果
- 【组合数学】递推方程 ( 有重根递推方程求解问题 | 问题提出 )
- 若依前后端分离项目图片上传后访问404问题
- cv2 改变图片大小 resize
- Holt-Winters:三次指数平滑算法
- KF、EKF、IEKF、UKF卡尔曼滤波器
- ubuntu 下搭建gitLab
- 油溶性量子点(齐岳)