forked from hahaha108/meituanAppSpider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
48 lines (40 loc) · 1.3 KB
/
settings.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
# -*- coding: utf-8 -*-
'''
meituan api spider's global variables settings.
'''
# HTTP Request headers infos setting variables:
headers = [
{
'User-Agent': 'AiMeiTuan /Xiaomi-4.4.2-MI 6 -720x1280-240-5.5.4-254-863254010002128-qqcpd',
'Host': 'api.meituan.com',
'Connection': 'Keep-Alive'
},
{
'User-Agent': 'AiMeiTuan /HUAWEI-4.4.2-HUAWEI MLA-AL10-720x1280-240-5.5.4-254-863254010002128-qqcpd',
'Host': 'api.meituan.com',
'Connection': 'Keep-Alive'
}
]
# limit setting variable used to limit numbers of restaurants in one request:
limit = 25
# Data storage path and filename(.csv or .txt file) setting variables:
savePath = './meituanRestaurantsInfos'
filename = 'HaikouRestaurants'
# MySQL table name and MySQL Database setting variables:
tableName = 'HaikouMeituan'
sqlConf = {
'host': '127.0.0.1',
'port': 3306,
'user': 'root',
'passwd': '123456',
'db': 'mtdb',
'charset': 'utf8',
}
# MongoDB collection name and MongoDB Database setting variables:
collection = 'HaikouMeituanCleaned'
mongoConf = {
'host': 'localhost', 'port': 27017, 'database': 'test',
'user': 'test', 'password': 'Crz437991'
}
# Neo4j graph database setting variables:
neoConf = {"host": "localhost", "port": 7687, "password": "Crz437991"}