Skip to content

Commit

Permalink
fix: disable search when user does not login
Browse files Browse the repository at this point in the history
  • Loading branch information
cosven committed Jan 5, 2024
1 parent 75a50e1 commit 446890d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fuo_bilibili/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ def sms_code_login(self, request: SmsCodeLoginRequest) -> SmsCodeLoginResponse:
return self._api.sms_code_login(request)

def search(self, keyword, type_, *args, **kwargs) -> Optional[SimpleSearchResult]:
if not self.has_current_user():
return None
request = self._format_search_request(keyword, type_)
if isinstance(request, Tuple):
response = tuple([self._api.search(r) for r in request])
Expand Down

0 comments on commit 446890d

Please sign in to comment.