-
Notifications
You must be signed in to change notification settings - Fork 1
/
闪贷有钱.py
57 lines (49 loc) · 1.39 KB
/
闪贷有钱.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/1/29 0029 13:39
# @Author : Chihiro
# @Site :
# @File : 白菜.py
# @Software: PyCharm
import json
from time import sleep
from Frame.Crawler import BaseSpider
from Frame.Request import Request
class Spider(BaseSpider, Request):
def __init__(self, account):
super(Spider, self).__init__(account)
def get_info(self):
url = "http://www.youxinsign.com:13083/youka/ope-channel/getChannelRegist?encCode=E74D550F1A5F891C"
json_info = self.request(url=url, method="get")
info = json.loads(json_info)["data"]["datas"][0]["outRegistCount"]
# print(html)
# num = info.xpath('//table[@id="blocks"]/*')#.extract()[0]
# print(info)
result = {
"注册人数": info,
"实名人数": "null",
"申请人数": "null",
"放款人数": "null",
"备注": "",
"地区": self.area,
"产品要求": self.requirements
}
self.write_sql(result)
AH = {
"login_url": "",
"area": 0,
"product": "闪贷有钱",
"username": "",
"password": "",
"message_code": "",
"channel": "",
"requirements": "",
"remark": ""
}
account_info = [AH]
while True:
for i in account_info:
product = Spider(i)
product.get_info()
product.driver.quit()
sleep(600)