pampa_workers 1.1.5 → 1.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/client.rb +1 -1
- data/lib/mybotprocess.rb +8 -3
- data/lib/myprocess.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0ac92cef77d1d960d4266bef7b3604b7e3b4b11
|
4
|
+
data.tar.gz: 67585e618694d0c31734065a5a4220b9cab1df86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0213d306f51180860cb0cfd8cb5aa92c2c58a6ca2a743c710881e90e10dbbc400519b231169047786c28b8bf7682ab3accded06d91e0cf205fce340b27fe0283
|
7
|
+
data.tar.gz: a346742eabe1963cb28b875b4810a26b4a2df96905645144b56db136f569b61025c26c3982a133e4bfa1421e65d7dec6819fadcd5b2e7ee3ac6b761c8a8be87f
|
data/lib/client.rb
CHANGED
@@ -10,7 +10,7 @@ module BlackStack
|
|
10
10
|
one_to_many :users, :class=>:'BlackStack::User', :key=>:id_client
|
11
11
|
many_to_one :timezone, :class=>:'BlackStack::Timezone', :key=>:id_timezone
|
12
12
|
many_to_one :billingCountry, :class=>:'BlackStack::LnCountry', :key=>:billing_id_lncountry
|
13
|
-
many_to_one :user_to_contect, :class=>'BlackStack
|
13
|
+
many_to_one :user_to_contect, :class=>'BlackStack::User', :key=>:id_user_to_contact
|
14
14
|
|
15
15
|
|
16
16
|
# -----------------------------------------------------------------------------------------
|
data/lib/mybotprocess.rb
CHANGED
@@ -2,7 +2,7 @@ module BlackStack
|
|
2
2
|
|
3
3
|
# clase de base para todos los bots ejecuten acciones con una cuenta de LinkedIn, Facebook, Twitter, etc.
|
4
4
|
class MyBotProcess < BlackStack::MyRemoteProcess
|
5
|
-
attr_accessor :username, :login_verifications, :run_once
|
5
|
+
attr_accessor :username, :login_verifications, :run_once, :cookies_robot
|
6
6
|
|
7
7
|
# constructor
|
8
8
|
def initialize(
|
@@ -18,7 +18,7 @@ module BlackStack
|
|
18
18
|
self.worker_name = "#{the_worker_name}"
|
19
19
|
self.division_name = the_division_name
|
20
20
|
self.minimum_enlapsed_seconds = the_minimum_enlapsed_seconds
|
21
|
-
|
21
|
+
|
22
22
|
# algunas clases como CreateLnUserProcess o RepairLnUserProcess, trabajan unicamente con el username especificado en este atributo, llamando al access point get_lnuser_by_username.
|
23
23
|
# si este atributo es nil, entonces la clase pide un lnuser a la division, llamando al access point get_lnuser.
|
24
24
|
self.username = nil
|
@@ -32,6 +32,9 @@ module BlackStack
|
|
32
32
|
# si este proceso se corre de forma supevisada, se desa correr el procesamiento una unica vez.
|
33
33
|
# cuando se activa este flag, generalmente se setea el atributo self.username tambien.
|
34
34
|
self.run_once = false
|
35
|
+
|
36
|
+
# preguntar al servidor si el lnuser debe calentar el browser visitando sitios al azar para recolectar cookies
|
37
|
+
self.cookies_robot = true
|
35
38
|
end
|
36
39
|
|
37
40
|
# returns a hash with the parameters of a lnuser
|
@@ -118,7 +121,9 @@ module BlackStack
|
|
118
121
|
"uid=#{lnuser['id']}&" +
|
119
122
|
"sender_name=#{URI.escape(chat[:sender_name])}&" +
|
120
123
|
"body=#{URI.escape(chat[:body])}&"
|
121
|
-
|
124
|
+
puts ""
|
125
|
+
puts "url:#{url}:."
|
126
|
+
puts ""
|
122
127
|
# HELP: File.open('./output3.txt', 'a') { |file| file.write(url + "\r\n") }
|
123
128
|
|
124
129
|
# push the chat
|
data/lib/myprocess.rb
CHANGED
@@ -199,7 +199,7 @@ module BlackStack
|
|
199
199
|
# se notifica al dispatcher de la division
|
200
200
|
def notify()
|
201
201
|
if (self.ws_url==nil || self.ws_port==nil)
|
202
|
-
raise "Cannot notify. Worker has not parameters."
|
202
|
+
raise "Cannot notify. Worker not exists, or it has not parameters, or it is belong another client. Check your api_key, and check the name of the worker."
|
203
203
|
end
|
204
204
|
|
205
205
|
# me notifico a la division. obtengo trabajo
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pampa_workers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro Daniel Sardi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket
|