1
0
Fork 0

fixes #143 missing cf_clearance raises error

Phind Search.create now raises ValueError if missing cf_clearance.
This commit is contained in:
Johannes 2023-04-26 08:00:06 +02:00
parent 7e858de0d4
commit 670b2b664e

View file

@ -53,7 +53,7 @@ class PhindResponse:
class Search: class Search:
def create(prompt: str, actualSearch: bool = True, language: str = 'en') -> dict: # None = no search def create(prompt: str, actualSearch: bool = True, language: str = 'en') -> dict: # None = no search
if user_agent == '': if user_agent == '' or cf_clearance == '':
raise ValueError('user_agent must be set, refer to documentation') raise ValueError('user_agent must be set, refer to documentation')
if not actualSearch: if not actualSearch: