Giter VIP home page Giter VIP logo

testerhome's Introduction

简介

解析: TesterHome 网站内容

目的

锻炼代码能力,熟悉Python Requests,爬虫,web开发等方面的库。


目标:

实现以下功能:
  • 模拟登录
  • 数据获取
  • 数据清洗分析
  • 内容转换成PDF文档
  • 数据可视化
  • 接口监控
  • 单元测试
  • python django 开发仿testerhome

使用

from testerhome.tsclient.client import TesterHomeClient

th_client = TesterHomeClient()

th_client.login('xie0723', 'xie0723') # 登录
  • 获取信息
from testerhome.tsclient.client import TesterHomeClient

th_client = TesterHomeClient()
th_client.login('xie0723', 'xie0723') 


# 登录态时默认是username的关注者,也可以自提供username
print(th_client.followers('seveniruby').followers_num) 


# 关注者detail
for name, zname in th_client.followers('seveniruby').followers_detail:  

    print(u'昵称:{:<16} 名字:{:<15}'.format(name, zname))

输出:

登录成功

关注者数量:910

昵称:sgq1117          名字:孙国权            
昵称:andyguo          名字:郭振华            
昵称:Lihuazhang       名字:恒温             
昵称:Anikikun         名字:大东             
昵称:oscarxie         名字:国文             
昵称:muchild          名字:七禾叶            
昵称:keen_lau         名字:keen           
昵称:guo              名字:GUO            
昵称:tomi             名字:TM             
昵称:qddegtya         名字:Archer_小A      
昵称:panshujuan       名字:潘淑娟            
昵称:cinderella       名字:汤大碗            
昵称:xulz             名字:许立             
昵称:luis             名字:               
昵称:oscar            名字:dabao          
昵称:luyi0824         名字:luyi0824       
昵称:skytiger0419     名字:宁如虎            
昵称:lion             名字:rywu           
.
.
.
.
# 获取任意文章创建时间
print(th_client.article(7880).topic_age)

# 获取任意文章阅读量
print(th_client.article(7880).topic_volume)

# 获取任意文章作者
print(th_client.article(7880).topic_auth)

输出:

topic_age:2017年3月10日
478 次阅读
topic_auth:Lihuazhang


TODO

  • 获取关注者数量,关注详情
  • 获取收藏数量,收藏详情
  • 完成正在关注 功能
  • 获取翻页数据,例如关注者翻页
  • 爬取指定ID文章功能
  • 完成爬取数据,分析测试关键字趋势变化
  • 增加多线程爬取,提高访问性能
  • 抓取收藏数最多的前N个文章,并转化成PDF
  • 抓取点赞数最多的前N个文章,并转化成PDF
  • 抓取关注数最多的前N个文章,并转化成PDF
  • 获取文章评论

About Me

爱生活,爱技术! To Be A Better Man

邮箱:[email protected]

Tester,Pythonista,^_^

testerhome's People

Contributors

xie0723 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.