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
f0858357
Commit
f0858357
authored
Oct 14, 2019
by
Hiro
🏄
Browse files
Reset limit if test address
parent
1b67ec28
Changes
2
Hide whitespace changes
Inline
Side-by-side
gettor.conf.json.example
View file @
f0858357
...
...
@@ -13,6 +13,7 @@
"consumer_secret": "",
"access_key": "",
"access_secret": "",
"test_hid" = "",
"twitter_handle": "get_tor",
"twitter_messages_endpoint": "https://api.twitter.com/1.1/direct_messages/events/list.json",
"twitter_new_message_endpoint": "https://api.twitter.com/1.1/direct_messages/events/new.json"
...
...
gettor/parse/email.py
View file @
f0858357
...
...
@@ -205,9 +205,14 @@ class EmailParser(object):
hid
=
hashlib
.
sha256
(
request
[
'id'
].
encode
(
'utf-8'
))
# check limits first
num_requests
=
yield
conn
.
get_num_requests
(
id
=
hid
.
hexdigest
(),
service
=
request_service
)
num_requests
=
limit
if
hid
.
hexdigest
()
==
self
.
settings
.
get
(
'test_hid'
):
num_requests
=
1
else
:
num_requests
=
yield
conn
.
get_num_requests
(
id
=
hid
.
hexdigest
(),
service
=
request_service
)
if
num_requests
[
0
][
0
]
<
email_requests_limit
:
return
1
...
...
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