├── SpiderKeeper ├── app │ ├── proxy │ │ ├── __init__.py │ │ ├── contrib │ │ │ ├── __init__.py │ │ │ └── scrapy.py │ │ └── spiderctrl.py │ ├── spider │ │ ├── __init__.py │ │ ├── model.py │ │ └── controller.py │ ├── schedulers │ │ ├── __init__.py │ │ └── common.py │ ├── static │ │ ├── fonts │ │ │ ├── ionicons.eot │ │ │ ├── ionicons.ttf │ │ │ ├── FontAwesome.otf │ │ │ ├── ionicons.woff │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── fontawesome-webfont.woff2 │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── js │ │ │ ├── pages │ │ │ │ └── base.js │ │ │ ├── html5shiv.min.js │ │ │ ├── respond.min.js │ │ │ ├── jquery.slimscroll.min.js │ │ │ ├── fastclick.min.js │ │ │ ├── AdminLTE.min.js │ │ │ └── demo.js │ │ └── css │ │ │ ├── app.css │ │ │ ├── skins │ │ │ └── skin-black-light.min.css │ │ │ └── font-awesome.min.css │ ├── util │ │ ├── __init__.py │ │ └── http.py │ ├── templates │ │ ├── job_log.html │ │ ├── server_stats.html │ │ ├── project_manage.html │ │ ├── spider_dashboard.html │ │ ├── spider_deploy.html │ │ ├── project_stats.html │ │ ├── base.html │ │ ├── job_periodic.html │ │ └── job_dashboard.html │ └── __init__.py ├── __init__.py ├── uwsgi.py ├── config.py └── run.py ├── MANIFEST.in ├── screenshot ├── screenshot_1.png ├── screenshot_2.png ├── screenshot_3.png ├── donate_wechat.png └── qqgroup_qrcode.png ├── .gitignore ├── requirements.txt ├── CHANGELOG.md ├── setup.py └── README.md /SpiderKeeper/app/proxy/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SpiderKeeper/app/spider/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SpiderKeeper/app/proxy/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SpiderKeeper/app/schedulers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SpiderKeeper/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = '1.2.0' 2 | __author__ = 'Dormy Mo' 3 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include SpiderKeeper/app/templates * 2 | recursive-include SpiderKeeper/app/static * -------------------------------------------------------------------------------- /screenshot/screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/screenshot/screenshot_1.png -------------------------------------------------------------------------------- /screenshot/screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/screenshot/screenshot_2.png -------------------------------------------------------------------------------- /screenshot/screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/screenshot/screenshot_3.png -------------------------------------------------------------------------------- /screenshot/donate_wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/screenshot/donate_wechat.png -------------------------------------------------------------------------------- /screenshot/qqgroup_qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/screenshot/qqgroup_qrcode.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.pyc 3 | docs/_build 4 | *egg-info 5 | .tox 6 | .coverage 7 | venv 8 | dist 9 | build 10 | SpiderKeeper.db 11 | -------------------------------------------------------------------------------- /SpiderKeeper/app/static/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/SpiderKeeper/app/static/fonts/ionicons.eot -------------------------------------------------------------------------------- /SpiderKeeper/app/static/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/SpiderKeeper/app/static/fonts/ionicons.ttf -------------------------------------------------------------------------------- /SpiderKeeper/app/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/SpiderKeeper/app/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /SpiderKeeper/app/static/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/SpiderKeeper/app/static/fonts/ionicons.woff -------------------------------------------------------------------------------- /SpiderKeeper/app/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/SpiderKeeper/app/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /SpiderKeeper/app/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/SpiderKeeper/app/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /SpiderKeeper/app/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/SpiderKeeper/app/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /SpiderKeeper/app/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/SpiderKeeper/app/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /SpiderKeeper/app/static/js/pages/base.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by modm on 2017/4/7. 3 | */ 4 | $(document).ready() 5 | $.get("/api/projects",function (data){ 6 | 7 | }) -------------------------------------------------------------------------------- /SpiderKeeper/app/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/SpiderKeeper/app/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /SpiderKeeper/app/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/SpiderKeeper/app/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /SpiderKeeper/app/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/SpiderKeeper/app/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /SpiderKeeper/app/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaussic/SpiderKeeper/master/SpiderKeeper/app/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /SpiderKeeper/app/util/__init__.py: -------------------------------------------------------------------------------- 1 | def project_path(): 2 | import inspect, os 3 | this_file = inspect.getfile(inspect.currentframe()) 4 | return os.path.abspath(os.path.dirname(this_file)+'/../') -------------------------------------------------------------------------------- /SpiderKeeper/uwsgi.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # @Time : 2017-09-24 14:53 4 | # @Author : modm 5 | ''' 6 | you can start the server by uwsgi 7 | like gunicorn -w 4 SpiderKeeper.uwsgi:app 8 | ''' 9 | from SpiderKeeper.app import app, initialize 10 | 11 | initialize() 12 | -------------------------------------------------------------------------------- /SpiderKeeper/app/static/css/app.css: -------------------------------------------------------------------------------- 1 | @media (max-width: 767px) { 2 | .nav-xs { 3 | margin: 0; 4 | } 5 | } 6 | 7 | .txt-args { 8 | font-size: 10px; 9 | display: block; 10 | white-space: nowrap; 11 | overflow: hidden; 12 | text-overflow: ellipsis; 13 | width: 100px; 14 | } -------------------------------------------------------------------------------- /SpiderKeeper/app/templates/job_log.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 |
12 | {% for line in log_lines %} 13 |{{ line }}
14 | {% endfor %} 15 | 16 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | aniso8601==1.2.0 2 | APScheduler==3.3.1 3 | click==6.7 4 | Flask==0.12.1 5 | Flask-BasicAuth==0.2.0 6 | Flask-RESTful==0.3.5 7 | flask-restful-swagger==0.19 8 | Flask-SQLAlchemy==2.2 9 | itsdangerous==0.24 10 | Jinja2==2.9.6 11 | MarkupSafe==1.0 12 | PyMySQL==0.7.11 13 | python-dateutil==2.6.0 14 | pytz==2017.2 15 | requests==2.13.0 16 | six==1.10.0 17 | SQLAlchemy==1.1.9 18 | tzlocal==1.3 19 | Werkzeug==0.12.1 20 | -------------------------------------------------------------------------------- /SpiderKeeper/app/templates/server_stats.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block content_header %} 3 || id | 14 |Spider Name | 15 |Last Runtime | 16 |Avg Runtime | 17 |
|---|---|---|---|
| {{ spider_instance.spider_instance_id }} | 21 |{{ spider_instance.spider_name }} | 22 |{{ spider_instance.spider_last_runtime }} | 23 |{{ readable_time(spider_instance.spider_avg_runtime) }} | 24 |
| # | 26 |Month | 27 |Day of Month | 28 |Day of Week | 29 |Hour | 30 |Minutes | 31 |Spider | 32 |Priority | 33 |Args | 34 |Tags | 35 |Enabled | 36 |Action | 37 |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ job_instance.job_instance_id }} | 41 |{{ job_instance.cron_month }} | 42 |{{ job_instance.cron_day_of_month }} | 43 |{{ job_instance.cron_day_of_week }} | 44 |{{ job_instance.cron_hour }} | 45 |{{ job_instance.cron_minutes }} | 46 |{{ job_instance.spider_name }} | 47 | {% if job_instance.priority == -1 %} 48 |49 | LOW 50 | | 51 | {% elif job_instance.priority == 0 %} 52 |53 | NORMAL 54 | | 55 | {% elif job_instance.priority == 1 %} 56 |57 | HIGH 58 | | 59 | {% elif job_instance.priority == 2 %} 60 |61 | HIGHEST 62 | | 63 | {% endif %} 64 |{{ job_instance.spider_arguments }} 66 | | 67 |{{ job_instance.tags }} | 68 | {% if job_instance.enabled %} 69 |70 | Enabled 72 | | 73 | {% else %} 74 |75 | Disabled 77 | | 78 | {% endif %} 79 |80 | Run 82 | Remove 84 | | 85 |
| # | 31 |Job | 32 |Spider | 33 |Args | 34 |Priority | 35 |Wait | 36 ||||
|---|---|---|---|---|---|---|---|---|
| {{ job.job_execution_id }} | 41 |{{ job.job_instance_id }} | 42 |{{ job.job_instance.spider_name }} | 43 |{{ job.job_instance.spider_arguments }} 45 | | 46 | {% if job.job_instance.priority == -1 %} 47 |48 | LOW 49 | | 50 | {% elif job.job_instance.priority == 0 %} 51 |52 | NORMAL 53 | | 54 | {% elif job.job_instance.priority == 1 %} 55 |56 | HIGH 57 | | 58 | {% elif job.job_instance.priority == 2 %} 59 |60 | HIGHEST 61 | | 62 | {% endif %} 63 |{{ timedelta(now,job.create_time) }} | 64 |
| # | 84 |Job | 85 |Spider | 86 |Args | 87 |Priority | 88 |Runtime | 89 |Started | 90 |Log | 91 |Running On | 92 |Action | 93 ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ job.job_execution_id }} | 98 |{{ job.job_instance_id }} | 99 |{{ job.job_instance.spider_name }} | 100 |{{ job.job_instance.spider_arguments }} 102 | | 103 | {% if job.job_instance.priority == -1 %} 104 |105 | LOW 106 | | 107 | {% elif job.job_instance.priority == 0 %} 108 |109 | NORMAL 110 | | 111 | {% elif job.job_instance.priority == 1 %} 112 |113 | HIGH 114 | | 115 | {% elif job.job_instance.priority == 2 %} 116 |117 | HIGHEST 118 | | 119 | {% endif %} 120 |{{ timedelta(now,job.start_time) }} | 121 |{{ job.start_time }} | 122 |Log 124 | | 125 |{{ job.running_on }} | 126 |127 | Stop 129 | | 130 |
| # | 150 |Job | 151 |Spider | 152 |Args | 153 |Priority | 154 |Runtime | 155 |Started | 156 |Log | 157 |Status | 158 |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ job.job_execution_id }} | 163 |{{ job.job_instance_id }} | 164 |{{ job.job_instance.spider_name }} | 165 |{{ job.job_instance.spider_arguments }} 167 | | 168 | {% if job.job_instance.priority == -1 %} 169 |170 | LOW 171 | | 172 | {% elif job.job_instance.priority == 0 %} 173 |174 | NORMAL 175 | | 176 | {% elif job.job_instance.priority == 1 %} 177 |178 | HIGH 179 | | 180 | {% elif job.job_instance.priority == 2 %} 181 |182 | HIGHEST 183 | | 184 | {% endif %} 185 |{{ timedelta(job.end_time,job.start_time) }} | 186 |{{ job.start_time }} | 187 |Log 189 | | 190 | {% if job.running_status == 2 %} 191 |192 | FINISHED 193 | | 194 | {% else %} 195 |196 | CANCELED 197 | | 198 | {% endif %} 199 |
Activate the fixed layout. You can't use fixed and boxed layouts together
" 63 | + "Activate the boxed layout
" 71 | + "Toggle the left sidebar's state (open or collapse)
" 79 | + "Let the sidebar mini expand on hover
" 87 | + "Toggle between slide over content and push content effects
" 95 | + "Toggle between dark and light skins for the right sidebar
" 103 | + "Blue
"); 115 | skins_list.append(skin_blue); 116 | var skin_black = 117 | $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) 118 | .append("" 119 | + "Black
"); 123 | skins_list.append(skin_black); 124 | var skin_purple = 125 | $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) 126 | .append("" 127 | + "Purple
"); 131 | skins_list.append(skin_purple); 132 | var skin_green = 133 | $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) 134 | .append("" 135 | + "Green
"); 139 | skins_list.append(skin_green); 140 | var skin_red = 141 | $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) 142 | .append("" 143 | + "Red
"); 147 | skins_list.append(skin_red); 148 | var skin_yellow = 149 | $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) 150 | .append("" 151 | + "Yellow
"); 155 | skins_list.append(skin_yellow); 156 | 157 | //Light sidebar skins 158 | var skin_blue_light = 159 | $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) 160 | .append("" 161 | + "Blue Light
"); 165 | skins_list.append(skin_blue_light); 166 | var skin_black_light = 167 | $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) 168 | .append("" 169 | + "Black Light
"); 173 | skins_list.append(skin_black_light); 174 | var skin_purple_light = 175 | $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) 176 | .append("" 177 | + "Purple Light
"); 181 | skins_list.append(skin_purple_light); 182 | var skin_green_light = 183 | $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) 184 | .append("" 185 | + "Green Light
"); 189 | skins_list.append(skin_green_light); 190 | var skin_red_light = 191 | $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) 192 | .append("" 193 | + "Red Light
"); 197 | skins_list.append(skin_red_light); 198 | var skin_yellow_light = 199 | $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) 200 | .append("" 201 | + "Yellow Light
"); 205 | skins_list.append(skin_yellow_light); 206 | 207 | demo_settings.append("