Skip to content

Commit 4972b19

Browse files
committed
fixed follower_count()
1 parent 32553fd commit 4972b19

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

scratchattach/site/user.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,12 @@ def featured_data(self):
234234

235235
def follower_count(self):
236236
# follower count
237-
text = requests.get(
238-
f"https://scratch.mit.edu/users/{self.username}/followers/",
239-
headers = self._headers
240-
).text
241-
return commons.webscrape_count(text, "Followers (", ")")
237+
with requests.no_error_handling():
238+
text = requests.get(
239+
f"https://scratch.mit.edu/users/{self.username}/followers/",
240+
headers = self._headers
241+
).text
242+
return commons.webscrape_count(text, "Followers (", ")")
242243

243244
def following_count(self):
244245
# following count

0 commit comments

Comments
 (0)