Last active
August 29, 2015 14:06
-
-
Save xingkaixin/0fdff93de37e0d45b002 to your computer and use it in GitHub Desktop.
how to scrapy xingkaixin.me
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
明晚我们盼点什么 http://XingKaiXin.me/2014/09/08/apple-event-2014-sep/ | |
蹦极超级爽,下次我要跳伞啦! http://XingKaiXin.me/2014/09/07/bungy-is-cool/ | |
Python小工具之CSV转为Excel http://XingKaiXin.me/2014/09/06/python-csv-conversion-excel/ | |
LNMP install on Ubuntu http://XingKaiXin.me/2014/09/04/lnmp-install-on-ubuntu/ | |
本站迁入DigitalOcean,顺便做个小结 http://XingKaiXin.me/2014/09/01/moveto-digitalocean/ | |
APP推荐:WATCH OUT! http://XingKaiXin.me/2014/08/31/app-watch-out/ | |
罗质翔,赢家是苹果 http://XingKaiXin.me/2014/08/27/laoluovsziru/ | |
日剧推荐:圣女还是恶女 http://XingKaiXin.me/2014/08/24/recommend-seijo/ | |
APP推荐:优秀的稍后读Pocket http://XingKaiXin.me/2014/08/20/recommend-an-app-pocket/ | |
APP推荐:Smash the Code http://XingKaiXin.me/2014/08/19/recommend-an-app-smash-the-code/ | |
手机、老罗和情怀 http://XingKaiXin.me/2014/08/18/talkaboutlaoluo/ | |
ALS冰桶挑战与慈善 http://XingKaiXin.me/2014/08/18/als_ice_bucket_challenge_and_charity/ | |
我为什么要付费 http://XingKaiXin.me/2014/08/16/payservices/ | |
第一篇~ http://XingKaiXin.me/2014/08/16/myfirstblog/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
明晚我们盼点什么 http://XingKaiXin.me/2014/09/08/apple-event-2014-sep/ | |
对于后天凌晨1点的Apple Event,我们盼点什么呢。 | |
iPhone | |
一定会有一款新的iPhone,是否如传闻一样,会有4.7、5.5两款iPhone就不得而知了。不过这部分大概是被剧透最多的吧,有泄露的原件、还有昨天在微博上的工程机泄露,看起来大屏幕这件事情是十拿九稳了。配合国内三大运营商的透露的信息来看,价格也知根知底了,剩下的就是4.7和5.5分别得上市时间了,如果同一时间上市,到是会对一些选择困难症用户造成困扰吧。今天的智能手机,你还真的不能期待什么惊艳的东西了,也就那样了吧。 | |
iOS | |
WWDC上介绍了iOS8,大概的特性已知了。不过对于用户来说,我更关心面对大屏幕,iOS会已什么样的逻辑来处理单手持机时的用户体验呢,从iOS7来看返回这类操作都是可以用过右划解决,可是对于处于窗口顶栏的内容,单手持机时点选一定会有困难的,这个问题在5.5上会更加明显。国内的魅族和锤子都采用了下拉悬停的方式来解决这个问题,这部分我还是蛮起来苹果会如何解决这个问题的。 | |
传闻许多年的iWatch | |
传闻了很多年的iWatch,似乎这次发布的可能性非常高。其一今年的iPhone据说会使用蓝宝石玻璃,而市面上稍微上点档次的手表也都使用蓝宝石玻璃。其二,穿戴设备目前公认是属于时尚用品的,就是这么巧的本次苹果发布会邀请了很多时尚媒体参与。似乎,今年iWatch真的要发布了,各家厂商终于可以找到一个范本来抄了。 | |
对于使用了Misfit Shine 10个月的时间的我,对于iWatch,我非常关注以下2点: | |
- 真正的防水。Shine本体也是防水的,可是原配的表带由于材料问题碰到热水后还是会存在材质的变化导致Shine很容易掉落的问题,而不易掉落的真皮表带,又不适合碰水。一个穿戴设备,如果需要考虑在触水前摘下的话,体验就是打折扣的。 | |
- 足够长的续航。Shine在这方面算是不错的,本身续航时间久,10个月的时间我更换了2次电池,且目前的剩余电量超过90%,而且电池使用的是纽扣电池,没电时你并不需要摘下手环去等上一会去电还是直接换电池就好了。这个部分,我认为非常的重要,一个穿戴手环,目标是监控你的所有行为,而如果为了充电需要过长的时间无法穿戴,那么时间已久你也就厌烦这个东西了,造型好的勉强还能戴上当个装饰品,要是造型一般估计就要开始吃灰了。关于这部分目前的传闻,iWatch的续航只有3天,那么iWatch如何充电就是他唯一的机会了,要是充电部分没有特别的改进,那再市场上的反响很难持续。 | |
考虑到以上2点,老实讲对于iWatch,我还是期望继续跳票吧,基于现有的技术产品,真的很难推出一个能打动我的智能手环。 | |
结语 | |
配合各种剧透,能盼的东西已经很少了,但是你还是会盼着那一个one more thing,要是今年没有就等着明年。得不到的就是这么的好! | |
题图来自:http://www.listofimages.com/ | |
var jiathis_config = {data_track_clickback:'true'}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
from bs4 import BeautifulSoup | |
class XingKaiXin: | |
def __init__(self): | |
self.xingkaixin = [] | |
def getBlogUrl(self, url): | |
page = urllib2.urlopen(url) | |
html_doc = page.read() | |
soup = BeautifulSoup(html_doc) | |
contents = soup.findAll('div',id='wrapper')[0].findAll('h2') | |
#content = soup.title.string.encode('utf-8') | |
#print contents | |
nextpage = soup.findAll('a','nextpostslink') | |
if len(nextpage) > 0: | |
nextpage = nextpage[0].get('href') | |
else: | |
nextpage = None | |
for content in contents: | |
blog = [] | |
if content.a is None: | |
pass | |
else: | |
blog.append(content.a.get('title').encode('utf-8') ) | |
blog.append(content.a.get('href')) | |
self.xingkaixin.append(blog) | |
if nextpage is None: | |
pass | |
else: | |
self.getBlogUrl(nextpage) | |
def getBlogText(self, url): | |
xingkaixin = {} | |
page = urllib2.urlopen(url) | |
html_doc = page.read() | |
soup = BeautifulSoup(html_doc) | |
contents = soup.findAll('div',id='wrapper')[0].findAll('div','pad group')[0].findAll('div','entry-inner')[0] | |
#content = soup.title.string.encode('utf-8') | |
text = contents.text.encode('utf-8') | |
return text | |
x = XingKaiXin() | |
x.getBlogUrl('http://xingkaixin.me') | |
blogs = x.xingkaixin | |
allblogcontent = [] | |
for blog in blogs: | |
blogcontent = [] | |
blogcontent.append(blog[0]) | |
blogcontent.append(blog[1]) | |
blogcontent.append(x.getBlogText(blog[1])) | |
allblogcontent.append(blogcontent) | |
print allblogcontent[0][0], allblogcontent[0][1] | |
print allblogcontent[0][2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment