Skip to content

Python scraper based on AI

Merge branch 'pre/beta' into temp

Marco Vinciguerrac1a217790d4d
diff --cc CHANGELOG.md
index 499722c9,b5cac9c1..6beeb037
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -1,20 -1,13 +1,21 @@@
-## [1.33.0-beta.2](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.33.0-beta.1...v1.33.0-beta.2) (2024-12-06)
+## [1.33.2](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.33.1...v1.33.2) (2024-12-06)
-### Features
+### Bug Fixes
+
+* client ([e16e94b](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/e16e94bf694d516071818adec5ea2f3a1404ec72))
+
+## [1.33.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.33.0...v1.33.1) (2024-12-06)
+
+
+### Bug Fixes
+
+* did a quick fix ([a6f43d5](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/a6f43d53cb760e74e5b437cb721b09a4e569c5a2))
-* added scrolling method to chromium docloader ([1c8b910](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/1c8b910562112947a357277bca9dc81619b72e61))
+## [1.33.0](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.32.0...v1.33.0) (2024-12-05)
-## [1.33.0-beta.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.32.0...v1.33.0-beta.1) (2024-12-05)
+
### Features
* add api integration ([8aa9103](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/8aa9103f02af92d9e1a780450daa7bb303afc150))
diff --cc scrapegraphai/docloaders/chromium.py
index 942827ac,f61f4d51..d63573d4
--- a/scrapegraphai/docloaders/chromium.py
+++ b/scrapegraphai/docloaders/chromium.py
@@@ -132,14 -263,13 +263,16 @@@ class ChromiumLoader(BaseLoader)
attempt += 1
logger.error(f"Attempt {attempt} failed: {e}")
if attempt == self.RETRY_LIMIT:
- raise RuntimeError(
- f"Failed to fetch {url} after {self.RETRY_LIMIT} attempts: {e}"
- )
+ results = f"Error: Network error after {self.RETRY_LIMIT} attempts - {e}"
finally:
- await browser.close()
+ if "browser" in locals():
+ await browser.close()
+
+ return results
+
+
++
async def ascrape_with_js_support(self, url: str) -> str:
"""
Asynchronously scrape the content of a given URL by rendering JavaScript using Playwright.