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
7ae5962f
Commit
7ae5962f
authored
Jan 23, 2022
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix hasTweets to has_tweets
parent
01edda02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
backend_requests.py
backend_requests.py
+8
-8
No files found.
backend_requests.py
View file @
7ae5962f
...
...
@@ -25,7 +25,7 @@ def searchban(screen_name):
# "screenName": "TwitterJP",
# "protected": False,
# "suspended": False,
# "has
T
weets": True,
# "has
_t
weets": True,
"exists"
:
False
,
"error"
:
None
},
...
...
@@ -66,10 +66,10 @@ def searchban(screen_name):
# return returnjson
# if profile_json["statuses_count"] == 0:
# returnjson["profile"]["has
T
weets"] = False
# returnjson["profile"]["has
_t
weets"] = False
# return returnjson
# else:
# returnjson["profile"]["has
T
weets"] = True
# returnjson["profile"]["has
_t
weets"] = True
# check whether the user has any tweets
usertlurl
=
"https://api.twitter.com/1.1/statuses/user_timeline.json"
...
...
@@ -85,10 +85,10 @@ def searchban(screen_name):
# return "No tweets found" # TODO: Better error handling
if
len
(
usertl_json
)
==
0
:
returnjson
[
"profile"
][
"has
T
weets"
]
=
False
returnjson
[
"profile"
][
"has
_t
weets"
]
=
False
return
returnjson
returnjson
[
"profile"
][
"has
T
weets"
]
=
True
returnjson
[
"profile"
][
"has
_t
weets"
]
=
True
if
usertl
.
status_code
==
200
:
returnjson
[
"profile"
][
"exists"
]
=
True
...
...
@@ -102,7 +102,7 @@ def searchban(screen_name):
if
"error"
in
usertl_json
and
usertl_json
[
"error"
]
==
"Not authorized."
:
returnjson
[
"profile"
][
"protected"
]
=
True
returnjson
[
"profile"
][
"suspended"
]
=
True
returnjson
[
"profile"
][
"has
T
weets"
]
=
False
returnjson
[
"profile"
][
"has
_t
weets"
]
=
False
return
returnjson
returnjson
[
"profile"
][
"error"
]
=
usertl_json
return
returnjson
...
...
@@ -112,10 +112,10 @@ def searchban(screen_name):
# return returnjson
# if usertl_json["statuses_count"] == 0:
# returnjson["profile"]["has
T
weets"] = False
# returnjson["profile"]["has
_t
weets"] = False
# return returnjson
# else:
# returnjson["profile"]["has
T
weets"] = True
# returnjson["profile"]["has
_t
weets"] = True
returnjson
[
"test"
]
=
{
"search"
:
"ok"
,
...
...
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