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
4a329d55
Commit
4a329d55
authored
May 23, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix search empty
parent
3c779626
Pipeline
#36707
passed with stages
in 1 minute and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
backend_requests.py
backend_requests.py
+11
-3
No files found.
backend_requests.py
View file @
4a329d55
...
...
@@ -127,8 +127,13 @@ def doSearch(screen_name):
}
response
=
twitter_b
.
get
(
searchurl_v2
,
params
=
params_v2
)
#print("Search: " + response.text)
search_v2
=
response
.
json
()
search_v2
=
{}
try
:
search_v2
=
response
.
json
()
except
Exception
as
e
:
print
(
"Search Error parsing JSON: "
+
str
(
e
))
print
(
"Response: "
+
response
.
text
)
return
None
isHealthy
=
'data'
in
search_v2
if
isHealthy
:
return
search_v2
[
"data"
][
"search_by_raw_query"
][
"search_timeline"
][
"timeline"
][
"instructions"
]
...
...
@@ -408,7 +413,9 @@ def searchban(screen_name):
## get replies
## Start GraphQL
guest_session
=
twitter_b
.
post
(
"https://api.twitter.com/1.1/guest/activate.json"
)
guest_session
=
twitter_b
.
post
(
"https://api.x.com/1.1/guest/activate.json"
)
print
(
"Guest session: "
+
guest_session
.
text
)
twitter_b
.
headers
[
"x-guest-token"
]
=
guest_session
.
json
()[
"guest_token"
]
...
...
@@ -435,6 +442,7 @@ def searchban(screen_name):
showmore
=
False
showmoreTweetId
=
None
showmoreReplyId
=
None
print
(
"Replies text: "
+
replies
.
text
)
repliesJson
=
replies
.
json
()
maindata
=
repliesJson
[
"data"
][
"user"
][
"result"
][
"timeline"
][
"timeline"
][
"instructions"
]
checkedTweets
=
set
()
...
...
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