fixes #143 missing cf_clearance raises error
Phind Search.create now raises ValueError if missing cf_clearance.
This commit is contained in:
parent
7e858de0d4
commit
670b2b664e
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue