Skip to content

Commit 6be0f5d

Browse files
authored
Update client.py
1 parent e3364a2 commit 6be0f5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rufus/client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ def __init__(self, api_key: str = None):
99
load_dotenv()
1010
self.api_key = api_key or os.getenv('RUFUS_API_KEY')
1111
if not self.api_key:
12-
raise ValueError("API key is required. Set RUFUS_API_KEY environment variable")
12+
raise ValueError("API key is required. Set the 'RUFUS_API_KEY' environment variable.")
1313
self.scraper = WebScraper()
1414
self.processor = ContentProcessor(api_key=self.api_key)
1515

1616
def scrape(self, url: str, instructions: str = None) -> List[Dict]:
1717
if not url.startswith(('http://', 'https://')):
18-
raise ValueError("Invalid URL format")
18+
raise ValueError("URL must start with 'http://' or 'https://'.")
1919
raw_content = self.scraper.crawl(url)
2020
return self.processor.process(raw_content, instructions)

0 commit comments

Comments
 (0)