Spaces:
Configuration error
Configuration error
Removed __pycache__ from tracking.
Browse files
.gitignore
CHANGED
@@ -1,2 +1,3 @@
|
|
|
|
1 |
.vscode
|
2 |
.venv
|
|
|
1 |
+
__pycache__
|
2 |
.vscode
|
3 |
.venv
|
functions/__pycache__/__init__.cpython-310.pyc
DELETED
Binary file (422 Bytes)
|
|
functions/__pycache__/context_acquisition.cpython-310.pyc
DELETED
Binary file (4.01 kB)
|
|
functions/__pycache__/data_acquisition.cpython-310.pyc
DELETED
Binary file (4 kB)
|
|
functions/context_acquisition.py
CHANGED
@@ -90,12 +90,12 @@ def get_linkedin_profile_html(profile_url: str, wait_time: int = 10) -> str:
|
|
90 |
return html_content
|
91 |
|
92 |
except WebDriverException as e:
|
93 |
-
logger.error(
|
94 |
-
raise WebDriverException(f"Browser automation failed: {str(e)}")
|
95 |
|
96 |
except Exception as e:
|
97 |
-
logger.error(
|
98 |
-
raise RuntimeError(f"Failed to retrieve LinkedIn profile: {str(e)}")
|
99 |
|
100 |
finally:
|
101 |
# Always clean up the driver
|
@@ -103,8 +103,8 @@ def get_linkedin_profile_html(profile_url: str, wait_time: int = 10) -> str:
|
|
103 |
try:
|
104 |
driver.quit()
|
105 |
logger.info("Browser session closed")
|
106 |
-
except
|
107 |
-
logger.warning(
|
108 |
|
109 |
|
110 |
def setup_chrome_driver_options() -> Options:
|
|
|
90 |
return html_content
|
91 |
|
92 |
except WebDriverException as e:
|
93 |
+
logger.error("WebDriver error occurred: %s", str(e))
|
94 |
+
raise WebDriverException(f"Browser automation failed: {str(e)}") from e
|
95 |
|
96 |
except Exception as e:
|
97 |
+
logger.error("Unexpected error occurred: %s", str(e))
|
98 |
+
raise RuntimeError(f"Failed to retrieve LinkedIn profile: {str(e)}") from e
|
99 |
|
100 |
finally:
|
101 |
# Always clean up the driver
|
|
|
103 |
try:
|
104 |
driver.quit()
|
105 |
logger.info("Browser session closed")
|
106 |
+
except WebDriverException as e:
|
107 |
+
logger.warning("Error closing browser: %s", str(e))
|
108 |
|
109 |
|
110 |
def setup_chrome_driver_options() -> Options:
|
requirements.txt
CHANGED
@@ -1 +1,3 @@
|
|
1 |
-
gradio
|
|
|
|
|
|
1 |
+
gradio>=4.0.0
|
2 |
+
selenium>=4.0.0
|
3 |
+
webdriver-manager>=3.8.0
|