├── .gitignore ├── App ├── app.js ├── app.json ├── app.wxss ├── components │ ├── hot │ │ ├── hot.wxml │ │ └── hot.wxss │ ├── live │ │ ├── live.wxml │ │ ├── live.wxss │ │ ├── live_middle.wxml │ │ ├── live_middle.wxss │ │ ├── live_small.wxml │ │ └── live_small.wxss │ ├── user │ │ ├── user.wxml │ │ ├── user.wxss │ │ ├── user_small.wxml │ │ └── user_small.wxss │ └── widget │ │ ├── rating.wxml │ │ └── rating.wxss ├── images │ ├── explore_normal.png │ ├── explore_pressed.png │ ├── hot_normal.png │ ├── hot_pressed.png │ ├── rating │ │ ├── semistar.png │ │ ├── semistar_s.png │ │ ├── star.png │ │ ├── star_s.png │ │ ├── unstar.png │ │ └── unstar_s.png │ ├── search-off.png │ ├── search-on.png │ ├── search@1x.png │ └── search@2x.png ├── pages │ ├── explore │ │ ├── explore.js │ │ ├── explore.json │ │ ├── explore.wxml │ │ └── explore.wxss │ ├── hot │ │ ├── lib.js │ │ ├── monthly.js │ │ ├── monthly.json │ │ ├── monthly.wxml │ │ ├── monthly.wxss │ │ ├── weekly.js │ │ ├── weekly.json │ │ ├── weekly.wxml │ │ └── weekly.wxss │ ├── live │ │ ├── live.js │ │ ├── live.json │ │ ├── live.wxml │ │ └── live.wxss │ ├── search │ │ ├── search.js │ │ ├── search.json │ │ ├── search.wxml │ │ └── search.wxss │ ├── topic │ │ ├── hot_topics.js │ │ ├── hot_topics.json │ │ ├── hot_topics.wxml │ │ ├── hot_topics.wxss │ │ ├── topic.js │ │ ├── topic.json │ │ ├── topic.wxml │ │ └── topic.wxss │ └── users │ │ ├── user.js │ │ ├── user.json │ │ ├── user.wxml │ │ ├── user.wxss │ │ ├── users.js │ │ ├── users.json │ │ ├── users.wxml │ │ └── users.wxss └── utils │ ├── api.js │ └── util.js ├── LICENSE ├── README.md ├── Server ├── LogGraph.ipynb ├── app.py ├── client.py ├── config.py ├── crawl.py ├── exception.py ├── models │ ├── __init__.py │ ├── live.py │ ├── speaker.py │ ├── topic.py │ └── utils.py ├── requirements.txt ├── static │ └── images │ │ ├── default-cover.png │ │ ├── default-topic.png │ │ ├── monthly.svg │ │ └── weekly.svg ├── stopwords-utf8.txt ├── test_es.py ├── utils.py └── views │ ├── __init__.py │ ├── api.py │ ├── protocol.py │ ├── schemas.py │ └── utils.py └── screenshot ├── zhihulive.gif └── zhihulive.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # Django stuff: 53 | *.log 54 | local_settings.py 55 | 56 | # Flask stuff: 57 | instance/ 58 | .webassets-cache 59 | 60 | # Scrapy stuff: 61 | .scrapy 62 | 63 | # Sphinx documentation 64 | docs/_build/ 65 | 66 | # PyBuilder 67 | target/ 68 | 69 | # IPython Notebook 70 | .ipynb_checkpoints 71 | 72 | # pyenv 73 | .python-version 74 | 75 | # celery beat schedule file 76 | celerybeat-schedule 77 | 78 | # dotenv 79 | .env 80 | 81 | # virtualenv 82 | venv/ 83 | ENV/ 84 | 85 | # Spyder project settings 86 | .spyderproject 87 | 88 | # Rope project settings 89 | .ropeproject 90 | -------------------------------------------------------------------------------- /App/app.js: -------------------------------------------------------------------------------- 1 | //app.js 2 | App({ 3 | onLaunch: function () { 4 | console.log('app Launching ...'); 5 | var that = this 6 | wx.getSystemInfo({ 7 | success(res) { 8 | that.systemInfo = res; 9 | }, 10 | }); 11 | }, 12 | getUserInfo: function (cb) { 13 | var that = this 14 | if (this.globalData.userInfo) { 15 | typeof cb == "function" && cb(this.globalData.userInfo) 16 | } else { 17 | wx.login({ 18 | success: function () { 19 | wx.getUserInfo({ 20 | success: function (res) { 21 | that.globalData.userInfo = res.userInfo 22 | typeof cb == "function" && cb(that.globalData.userInfo) 23 | } 24 | }) 25 | } 26 | }) 27 | } 28 | }, 29 | globalData: { 30 | userInfo: null 31 | }, 32 | systemInfo: null 33 | }) -------------------------------------------------------------------------------- /App/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/explore/explore", 4 | "pages/search/search", 5 | "pages/users/users", 6 | "pages/users/user", 7 | "pages/hot/weekly", 8 | "pages/topic/hot_topics", 9 | "pages/live/live", 10 | "pages/topic/topic", 11 | "pages/hot/monthly" 12 | ], 13 | "window": { 14 | "backgroundTextStyle": "dark", 15 | "navigationBarBackgroundColor": "#4abdcc", 16 | "navigationBarTitleText": "知乎Live", 17 | "navigationBarTextStyle": "white", 18 | "enablePullDownRefresh": true 19 | }, 20 | "tabBar": { 21 | "color": "#b0b0b0", 22 | "selectedColor": "#4abdcc", 23 | "borderStyle": "white", 24 | "backgroundColor": "#fff", 25 | "list": [ 26 | { 27 | "pagePath": "pages/explore/explore", 28 | "iconPath": "images/explore_normal.png", 29 | "selectedIconPath": "images/explore_pressed.png", 30 | "text": "发现" 31 | }, 32 | { 33 | "pagePath": "pages/hot/weekly", 34 | "iconPath": "images/explore_normal.png", 35 | "selectedIconPath": "images/explore_pressed.png", 36 | "text": "热门" 37 | }, 38 | { 39 | "pagePath": "pages/search/search", 40 | "iconPath": "images/search-off.png", 41 | "selectedIconPath": "images/search-on.png", 42 | "text": "搜索" 43 | } 44 | ] 45 | }, 46 | "debug": true 47 | } -------------------------------------------------------------------------------- /App/app.wxss: -------------------------------------------------------------------------------- 1 | .container { 2 | height: 100%; 3 | display: flex; 4 | flex-direction: column; 5 | align-items: center; 6 | justify-content: space-between; 7 | padding: 200rpx 0; 8 | box-sizing: border-box; 9 | } 10 | 11 | page { 12 | font: 14px "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, STHeiti; 13 | line-height: 1.5; 14 | } 15 | 16 | .clearfix:after { 17 | content: ''; 18 | clear: both; 19 | overflow: hidden; 20 | height: 0; 21 | display: block; 22 | } 23 | -------------------------------------------------------------------------------- /App/components/hot/hot.wxml: -------------------------------------------------------------------------------- 1 | 2 |