Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hiro
GetTor
Commits
c275dbb3
Commit
c275dbb3
authored
Oct 15, 2019
by
Hiro
🏄
Browse files
Fix twitter parser logic
parent
b15674b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
gettor/parse/twitter.py
View file @
c275dbb3
...
...
@@ -120,14 +120,7 @@ class TwitterParser(object):
id
=
hid
.
hexdigest
(),
service
=
request
[
'service'
]
)
if
num_requests
[
0
][
0
]
>
twitter_requests_limit
:
log
.
msg
(
"Discarded. Too many requests from {}."
.
format
(
hid
.
hexdigest
),
system
=
"twitter parser"
)
else
:
if
num_requests
[
0
][
0
]
<
twitter_requests_limit
:
conn
.
new_request
(
id
=
str
(
request
[
'id'
]),
command
=
request
[
'command'
],
...
...
@@ -138,6 +131,14 @@ class TwitterParser(object):
status
=
"ONHOLD"
,
)
else
:
log
.
msg
(
"Discarded. Too many requests from {}."
.
format
(
hid
.
hexdigest
),
system
=
"twitter parser"
)
def
parse_errback
(
self
,
error
):
"""
Errback if we don't/can't parse the message's content.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment