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
de16a5e8
Commit
de16a5e8
authored
Jun 30, 2023
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use cookie everywhere
parent
eb9adb1e
Pipeline
#22490
passed with stages
in 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
backend_requests.py
backend_requests.py
+4
-3
No files found.
backend_requests.py
View file @
de16a5e8
...
...
@@ -73,7 +73,7 @@ def getTwitterSession(useCookie):
twitter_b
=
OAuth2Session
()
twitter_b
.
headers
[
"Authorization"
]
=
"Bearer {}"
.
format
(
random
.
choice
(
twitterKeys
))
twitter_b
.
headers
[
'user-agent'
]
=
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
if
cookie
and
csrf
and
useCookie
:
if
cookie
and
csrf
:
#
and useCookie:
twitter_b
.
headers
[
'cookie'
]
=
cookie
twitter_b
.
headers
[
'x-csrf-token'
]
=
csrf
return
twitter_b
...
...
@@ -238,6 +238,7 @@ def searchban(screen_name):
returnjson
[
"profile"
][
"suspended"
]
=
True
return
returnjson
else
:
print
(
"Profile error: "
+
usertl
.
text
)
if
"error"
in
usertl_json
and
usertl_json
[
"error"
]
==
"Not authorized."
:
returnjson
[
"profile"
][
"protected"
]
=
True
returnjson
[
"profile"
][
"suspended"
]
=
True
...
...
@@ -446,8 +447,8 @@ def searchban(screen_name):
except
KeyError
as
e
:
print
(
"Errored testing {}"
.
format
(
screen_name
))
print
(
e
)
#
if replies is not None:
#
print("Response: " + replies.text)
if
replies
is
not
None
:
print
(
"Response: "
+
replies
.
text
)
returnjson
[
"tests"
][
"ghost"
]
=
{}
returnjson
[
"tests"
][
"more_replies"
]
=
{}
hasFailure
=
True
...
...
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