Spaces:
Running
Running
Update linkedin_follower_stats.py
Browse files
linkedin_follower_stats.py
CHANGED
@@ -263,17 +263,17 @@ def fetch_monthly_follower_gains(session, org_urn, api_rest_base):
|
|
263 |
code = getattr(http_err.response, 'status_code', 'N/A')
|
264 |
text = getattr(http_err.response, 'text', str(http_err))
|
265 |
logging.error(f"HTTP error fetching monthly gains for {org_urn}: {code} - {text}")
|
266 |
-
logging.error(f"Request URL: {
|
267 |
except requests.exceptions.RequestException as e:
|
268 |
# Catch other request-related errors (e.g., connection issues)
|
269 |
code = getattr(e.response, 'status_code', 'N/A') if e.response is not None else 'N/A'
|
270 |
text = getattr(e.response, 'text', str(e)) if e.response is not None else str(e)
|
271 |
logging.error(f"Error fetching monthly gains for {org_urn}: {code} - {text}")
|
272 |
-
logging.error(f"Request URL: {
|
273 |
except Exception as ex:
|
274 |
# Catch any other unexpected errors (e.g., JSON parsing if response is not JSON)
|
275 |
logging.error(f"An unexpected error occurred while fetching monthly gains for {org_urn}: {str(ex)}")
|
276 |
-
logging.error(f"Request URL: {
|
277 |
|
278 |
return results
|
279 |
|
|
|
263 |
code = getattr(http_err.response, 'status_code', 'N/A')
|
264 |
text = getattr(http_err.response, 'text', str(http_err))
|
265 |
logging.error(f"HTTP error fetching monthly gains for {org_urn}: {code} - {text}")
|
266 |
+
logging.error(f"Request URL: {request_url_for_logging}")
|
267 |
except requests.exceptions.RequestException as e:
|
268 |
# Catch other request-related errors (e.g., connection issues)
|
269 |
code = getattr(e.response, 'status_code', 'N/A') if e.response is not None else 'N/A'
|
270 |
text = getattr(e.response, 'text', str(e)) if e.response is not None else str(e)
|
271 |
logging.error(f"Error fetching monthly gains for {org_urn}: {code} - {text}")
|
272 |
+
logging.error(f"Request URL: {request_url_for_logging}")
|
273 |
except Exception as ex:
|
274 |
# Catch any other unexpected errors (e.g., JSON parsing if response is not JSON)
|
275 |
logging.error(f"An unexpected error occurred while fetching monthly gains for {org_urn}: {str(ex)}")
|
276 |
+
logging.error(f"Request URL: {request_url_for_logging}")
|
277 |
|
278 |
return results
|
279 |
|