Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
shadowban-eu-backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
shadowban-eu-backend
Commits
14ab4b54
Commit
14ab4b54
authored
Jan 20, 2020
by
Raphael Beer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove: TimelineTermination experiment
parent
c6bb0c3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
31 deletions
+0
-31
backend.py
backend.py
+0
-12
timeline_termination.py
timeline_termination.py
+0
-19
No files found.
backend.py
View file @
14ab4b54
...
...
@@ -13,7 +13,6 @@ import time
from
aiohttp
import
web
from
bs4
import
BeautifulSoup
from
db
import
connect
from
timeline_termination
import
TimelineTermination
routes
=
web
.
RouteTableDef
()
...
...
@@ -450,15 +449,6 @@ class TwitterSession:
if
more_replies_test
and
not
get_nested
(
result
,
[
"tests"
,
"ghost"
,
"ban"
],
False
):
result
[
"tests"
][
"more_replies"
]
=
await
self
.
test_barrier
(
user_id
)
# if result["tests"]["search"] != False:
# try:
# debug('[TimelineTermination] Requesting status for ' + result["tests"]["search"])
# result["tests"]["timeline_termination"] = await TimelineTermination.requestTest(result["tests"]["search"], debug)
# except Exception as e:
# debug('[TimelineTermination] Request failed for ' + result["tests"]["search"])
# debug(e)
debug
(
'Writing result for '
+
result
[
'profile'
][
'screen_name'
]
+
' to DB'
)
db
.
write_result
(
result
)
return
result
...
...
@@ -558,11 +548,9 @@ parser.add_argument('--mongo-host', type=str, default='localhost', help='hostnam
parser
.
add_argument
(
'--mongo-port'
,
type
=
int
,
default
=
27017
,
help
=
'port of mongoDB service to connect to'
)
parser
.
add_argument
(
'--mongo-db'
,
type
=
str
,
default
=
'tester'
,
help
=
'name of mongo database to use'
)
parser
.
add_argument
(
'--twitter-auth-key'
,
type
=
str
,
default
=
None
,
help
=
'auth key for twitter guest session'
,
required
=
True
)
parser
.
add_argument
(
'--timeline-termination-endpoint'
,
type
=
str
,
default
=
None
,
help
=
'endpoint of TimelineTermination test service'
,
required
=
True
)
args
=
parser
.
parse_args
()
TwitterSession
.
twitter_auth_key
=
args
.
twitter_auth_key
TimelineTermination
.
endpoint
=
args
.
timeline_termination_endpoint
ensure_dir
(
args
.
cookie_dir
)
with
open
(
args
.
account_file
,
"r"
)
as
f
:
...
...
timeline_termination.py
deleted
100644 → 0
View file @
c6bb0c3e
from
aiohttp
import
ClientSession
class
TimelineTermination
:
endpoint
=
None
session
=
ClientSession
()
async
def
requestTest
(
tweet_id
,
debug
):
async
with
TimelineTermination
.
session
.
get
(
TimelineTermination
.
endpoint
+
tweet_id
)
as
response
:
result
=
await
response
.
json
()
if
result
.
get
(
"name"
,
None
)
==
"APIError"
and
result
[
"errors"
][
0
][
"code"
]
==
"ENOREPLIES"
:
debug
(
'[TimelineTermination] '
+
tweet_id
+
'has no replies - can not test.'
)
return
None
result
[
"tweets"
][
"subject"
]
=
result
[
"tweets"
][
"subject"
][
"tweetId"
]
result
[
"tweets"
][
"testedWith"
]
=
result
[
"tweets"
][
"testedWith"
][
"tweetId"
]
return
result
Write
Preview
Markdown
is supported
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