Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamicSpider #13

Closed
ldkgit opened this issue Jul 7, 2017 · 1 comment
Closed

DynamicSpider #13

ldkgit opened this issue Jul 7, 2017 · 1 comment

Comments

@ldkgit
Copy link

ldkgit commented Jul 7, 2017

这个爬虫的比网页显示的数据少,存到sqlite里的也少,运行后'NoneType' object has no attribute 'get' http://service.library.mtime.com/Movie.api?Ajax_CallBack=true&Ajax_CallBackType=Mtime.Library.Services&Ajax_CallBackMethod=GetMovieOverviewRating&Ajax_CrossDomain=1&Ajax_RequestUrl=http://movie.mtime.com/247097/&t=201707072006523282&Ajax_CallBackArgument0=247097 {u'value': {u'userLastComment': u'', u'releaseType': 1, u'isRelease': True, u'tweetId': 0, u'movieRating': {u'TitleEn': u'', u'RPictureFinal': 0, u'AttitudeCount': 22, u'MovieId': 247097, u'TitleCn': u'', u'RShowFinal': 0, u'RDirectorFinal': 0, u'EnterTime': 0, u'RTotalFinal': 0, u'UserId': 0, u'ROtherFinal': 0, u'JustTotal': 0, u'Year': u'', u'RatingFinal': -1, u'RatingCount': 0, u'RStoryFinal': 0, u'IP': 0, u'Usercount': 23}, u'movieTitle': u'\u649e\u90aa31\u53f7', u'userLastCommentUrl': u''}, u'error': None}
有这种日志

@qiyeboy
Copy link
Owner

qiyeboy commented Jul 13, 2017

这里的代码只是一个demo,教你怎么爬取ajax,由于不同的电影返回的数据,有一些字段没有,会报错,你加上异常处理就行了

@qiyeboy qiyeboy closed this as completed Jul 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants