Remove print statement in map
This commit is contained in:
@@ -228,7 +228,7 @@ class FirecrawlApp:
|
|||||||
json_data = {'url': url}
|
json_data = {'url': url}
|
||||||
if params:
|
if params:
|
||||||
json_data.update(params)
|
json_data.update(params)
|
||||||
|
|
||||||
# Make the POST request with the prepared headers and JSON data
|
# Make the POST request with the prepared headers and JSON data
|
||||||
response = requests.post(
|
response = requests.post(
|
||||||
f'{self.api_url}{endpoint}',
|
f'{self.api_url}{endpoint}',
|
||||||
@@ -238,7 +238,7 @@ class FirecrawlApp:
|
|||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response = response.json()
|
response = response.json()
|
||||||
if response['success'] and 'links' in response:
|
if response['success'] and 'links' in response:
|
||||||
return response['links']
|
return response
|
||||||
else:
|
else:
|
||||||
raise Exception(f'Failed to map URL. Error: {response["error"]}')
|
raise Exception(f'Failed to map URL. Error: {response["error"]}')
|
||||||
else:
|
else:
|
||||||
@@ -434,4 +434,4 @@ class CrawlWatcher:
|
|||||||
self.dispatch_event('document', doc)
|
self.dispatch_event('document', doc)
|
||||||
elif msg['type'] == 'document':
|
elif msg['type'] == 'document':
|
||||||
self.data.append(msg['data'])
|
self.data.append(msg['data'])
|
||||||
self.dispatch_event('document', msg['data'])
|
self.dispatch_event('document', msg['data'])
|
||||||
|
|||||||
Reference in New Issue
Block a user