Skip to content

Commit

Permalink
新增打码平台
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghe06 committed May 26, 2019
1 parent b4b20a4 commit 9e29525
Show file tree
Hide file tree
Showing 15 changed files with 263 additions and 240 deletions.
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ tools/toutiao.py
news/middlewares/httpproxy_vps.py

# config
config/*
!config/__init__.py
!config/default.py

env_*.sh
!env_default.sh
#config/*
#!config/__init__.py
#!config/default.py
#
#env_*.sh
#!env_default.sh


# gitbook
Expand Down
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,24 @@
- Redis
- NodeJS

本项目依赖第三方验证码识别服务, 注册地址: http://www.ruokuai.com/
本项目依赖第三方验证码识别服务

更新配置 config/develop.py 用户名和密码
更新配置 config/default.py 用户名和密码
```
RK_CONFIG = {
'username': '******',
'password': '******',
'soft_id': '93676',
'soft_key': '5d0e00b196c244cb9d8413809c62f9d5',
}
# 斐斐打码
FF_CONFIG = {
'pd_id': '******',
'pd_key': '******',
'app_id': '312451',
'app_key': '5YuN+6isLserKBZti4hoaI6UR2N5UT2j',
}
```

```bash
Expand All @@ -28,7 +36,7 @@ virtualenv news_spider.env # 创建虚拟环境
# python3
virtualenv news_spider.env -p python3 # 创建虚拟环境

source env_develop.sh # 激活虚拟环境
source env_default.sh # 激活虚拟环境
pip install -r requirements-py2.txt # 安装环境依赖
# 开发环境 模拟单次抓取
python tasks/job_put_tasks.py wx # 初次创建任务
Expand Down Expand Up @@ -150,12 +158,16 @@ scrapy crawl weibo

### 验证码识别

http://www.ruokuai.com/
~~http://www.ruokuai.com/~~

~~http://wiki.ruokuai.com/~~

http://wiki.ruokuai.com/
~~价格类型:~~
~~http://www.ruokuai.com/home/pricetype~~

价格类型:
http://www.ruokuai.com/home/pricetype
热心网友反映`若快`已经关闭, 接下来会支持`斐斐打码`, 敬请期待

斐斐打码开发文档 [http://docs.fateadm.com](http://docs.fateadm.com)


### 索引说明
Expand Down Expand Up @@ -192,7 +204,9 @@ LongText | 2的32次方–1 | 4,294,967,295 | 4GB

M端2个参数获取方法已公开, 参考蜘蛛 toutiao_m

PC端3个参数获取方法已破解, 由于公开之后会引起头条反爬机制更新, 故没有公开, 如有需要, 敬请私聊, 仅供学习, 谢绝商用
~~PC端3个参数获取方法已破解, 由于公开之后会引起头条反爬机制更新, 故没有公开, 如有需要, 敬请私聊, 仅供学习, 谢绝商用~~

因M端已满足数据获取要求, 不再开源PC端签名破解


### TODO
Expand Down
4 changes: 2 additions & 2 deletions apps/client_rk.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""


from libs.rk import RClient
from libs.rk import RKClient
from libs.counter import CounterClient
from apps.client_db import redis_client
from tools.cookies import len_cookies
Expand All @@ -21,7 +21,7 @@
RK_LIMIT_COUNT_DAILY = current_config.RK_LIMIT_COUNT_DAILY
COOKIES_QUEUE_COUNT = current_config.COOKIES_QUEUE_COUNT

rc_client = RClient(**RK_CONFIG)
rc_client = RKClient(**RK_CONFIG)

rk_counter_client = CounterClient(redis_client, 'rk')

Expand Down
8 changes: 8 additions & 0 deletions config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@
'soft_key': '5d0e00b196c244cb9d8413809c62f9d5',
}

# 斐斐打码
FF_CONFIG = {
'pd_id': '******',
'pd_key': '******',
'app_id': '312451',
'app_key': '5YuN+6isLserKBZti4hoaI6UR2N5UT2j',
}

# 熔断机制 每天请求限制(200元==500000快豆)
RK_LIMIT_COUNT_DAILY = 925

Expand Down
71 changes: 0 additions & 71 deletions config/develop.py

This file was deleted.

71 changes: 0 additions & 71 deletions config/product.py

This file was deleted.

1 change: 1 addition & 0 deletions db/data/mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,4 @@ INSERT INTO `fetch_task` VALUES (131, 2, 0, '1006063481197561', '中国互联网
INSERT INTO `fetch_task` VALUES (132, 2, 0, '1002061768025224', '互联网周刊', '', '', 1, '', '2017-01-11 11:01:05', '2017-01-11 11:01:05');
INSERT INTO `fetch_task` VALUES (133, 2, 0, '1002063819805149', '互联网焦点网', '', '', 1, '', '2017-01-11 11:01:05', '2017-01-11 11:01:05');
INSERT INTO `fetch_task` VALUES (134, 3, 0, '55982516338', '奇文志怪', '', 'http://m.toutiao.com/profile/55982516338/', 1, '', '2018-09-06 14:01:05', '2018-09-06 14:01:05');
INSERT INTO `fetch_task` VALUES (135, 3, 0, '6014591174', '鹏君读书', '', 'http://m.toutiao.com/profile/6014591174/', 1, '', '2017-01-11 11:01:05', '2017-01-11 11:01:05');
8 changes: 0 additions & 8 deletions env_develop.sh

This file was deleted.

8 changes: 0 additions & 8 deletions env_product.sh

This file was deleted.

16 changes: 8 additions & 8 deletions etc/toutiao.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ autorestart=true
redirect_stderr=true
stdout_logfile=logs/scrapy_toutiao.log

[program:reboot_net]
command=python tasks/run_job_reboot_net_china_net.py
startsecs=0
stopwaitsecs=0
autostart=false
autorestart=true
redirect_stderr=true
stdout_logfile=logs/reboot_net_china_net.log
;[program:reboot_net]
;command=python tasks/run_job_reboot_net_china_net.py
;startsecs=0
;stopwaitsecs=0
;autostart=false
;autorestart=true
;redirect_stderr=true
;stdout_logfile=logs/reboot_net_china_net.log

0 comments on commit 9e29525

Please sign in to comment.