-
Notifications
You must be signed in to change notification settings - Fork 1
/
conf.json
179 lines (177 loc) · 7.4 KB
/
conf.json
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
{
"description": {
"en": "Conf.json is default configuration file. Please do not changed that conf file. Create new \"myconf.json\" file in project root and copy this json your \"myconf.json\" file ."
},
"scope": [
{
"settings":{
"search_time_sleep": 5,
"download_time_sleep": 5,
"session_id": "alamy_dollar",
"role": "main || scanner || downloader",
"is_go_again_history": false,
"multi_process": {
"time_out": 300,
"limit": 3,
"base": "mongo || memory"
},
"driver": {
"driver_path": "/usr/lib/chromium-browser/chromedriver",
"driver_arguments": [
"--no-sandbox",
"--headless"
],
"driver_emulations": [
],
"driver_extensions": [
]
},
"database": {
"type": "MongoDB",
"name": "BotDatabase",
"uri": "mongodb://localhost:27017/",
"user_name": "admin",
"password": "database_password",
"collections": {
"history_collection": { "name": "history_collection" },
"log_collection": { "name": "log_collection" },
"main": { "name": "main_collection" }
}
},
"history": {
"collection_name": "history_collection",
"source": "mysql, mongo, postgre",
"clear_on_exit": true
},
"file_settings": {
"max_file_length": 150
}
},
"scope_name":"your_scope_name",
"login": {
"events": [
{
"selector": "//div[@class='UnauthHeader__rightContentContainer']/div[@class='Jea XiG gjz mQ8 zI7 iyn Hsu']/button[@class='lightGrey headerLoginButton active']",
"delay": 0,
"sleep": 0,
"actions": [
{ "type": "click", "delay": 1 }
]
}
],
"forms": [
{
"inputs": [
{
"value": "your_value",
"selector": "//div[@class='zI7 iyn Hsu']/fieldset/div[@class='zI7 iyn Hsu']/span/input[@id='email']"
},
{
"value": "your_value",
"selector": "//div[@class='zI7 iyn Hsu']/fieldset/div[@class='zI7 iyn Hsu']/span/input[@id='password']"
}
],
"submit": {
"selector": "//div[@data-test-id='registerFormSubmitButton']/button[@class='red SignupButton active']",
"event": ""
}
}
]
},
"page": {
"url": "https://www.sahibinden.com/otomobil?pagingSize=50",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 OPR/54.0.2952.64",
"data": ""
},
"reporting": {
"page_count": 0,
"download_counter": 0
},
"before_actions": [
{
"type": "navigate_to",
"to": "https://www.linkedin.com"
},
{
"type": "load_cookie_from_database",
"name": "linkedin_cookie"
},
{
"type": "navigate_to",
"to": "https://www.linkedin.com/feed/"
}
],
"script_actions": [
{
"type": "",
"event": "click",
"value": "",
"selector": "",
"desc":"",
}
],
"search_item": [
{
"class_names": [
"classifiedTitle"
],
"type": "loop",
"enable_javascript": false,
"attrib": "src",
"download_attrib": false,
"download_folder": "/downloads/dollar_bill_note",
"headers": {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 OPR/54.0.2952.64",
},
"events": [
{
"selector": ".//a[@class='home-card'][1]",
"delay": 1,
"sleep": 5,
"actions": [
{ "type": "excute_script", "script": "window.scrollTo(0,400);", "delay": 1 },
{ "type": "style", "style": "background: red;", "delay": 1 },
{ "type": "click", "delay": 1 }
]
},
{
"selector": ".//div[@class='column is-4-fullhd is-4-widescreen is-4-tablet is-6-mobile is-12-small filter-card']/div[@class='card-actions has-text-centered']/a",
"delay": 1,
"sleep": 5,
"actions": [
{ "type": "style", "style": "background: red;" },
{ "type": "click" }
]
}
],
"for_item": [{
"dynamic_folder": {
"element_type": "loop",
"child_name_class": "//li[@class='breadcrumbItem']/a",
"custom_seperator": "os.sep",
},
"download_folder": "auto_images",
"custom_seperator": "/",
"item_list": [{
"class_name": "//div[contains(concat(' ', normalize-space(@class), ' '), ' classifiedDetailMainPhoto ']/label/img",
"classNames": [
"//div[@class='classifiedDetailMainPhoto']/label/img",
"//div[@class='classifiedDetailMainPhoto']/label/span"
],
"process": "download",
"need_attr": {
"if": "data-src",
"else": "src"
}
}]
}],
"pagination": {
"class": "prevNextBut",
"if_exists_class": "last",
"attrib": "href"
}
}
]
}
]
}