Commit Graph

38 Commits

Author SHA1 Message Date
Karim shoair ae60c2c0ad fix(playwright engine): bug in checking nstbrowser_config type 2025-01-30 20:07:19 +02:00
Karim shoair f9b85cfbac fix(PlaywrightFetcher): Use more dependable response data 2024-12-26 00:27:13 +02:00
Karim shoair 5be8c2a95e style(Fetchers): Setting correct type hint for wait_selector_state argument 2024-12-19 13:22:12 +02:00
Karim shoair 844cb0c6a2 fix(PlaywrightFetcher): Wait for the real response status code
This will return the real status response after redirection for websites that have Cloudflare instead of Playwright's default behavior.
2024-12-19 13:00:19 +02:00
Karim shoair eceef48ef5 fix(Fetchers/page_action): Fixing logic 2024-12-16 12:34:23 +02:00
Karim shoair af4f2c0f74 feat(PlaywrightFetcher): Add async support for PlaywrightFetcher 2024-12-16 00:15:47 +02:00
Karim shoair 889c111855 refactor(Playwright Engine): Separate what we can for cleaner code and the async function later
The caching will give a slight performance increase with bulk requests
2024-12-15 23:25:02 +02:00
Karim shoair 193827e27b refactor(api)!: Unifying log under 1 logger and removing debug parameter
So now you control the logging and the debugging from the shell through the logger with the name 'scrapling'
2024-12-11 21:41:37 +02:00
Karim shoair 1a17b2ce46 Sorting all library imports with isort 2024-11-30 14:02:06 +02:00
Karim shoair 28b783e86b Improving the stealth mode a bit for Playwright 2024-11-26 22:41:04 +02:00
Karim shoair 1cf7cee1a2 Fetchers - Wait for page to be stable again if the user wanted to wait for a selector 2024-11-26 20:26:54 +02:00
Karim shoair 60d551d839 PlaywrightFetcher - Add the option to set locale of the browser 2024-11-26 17:39:03 +02:00
Karim shoair 0176bc0523 PlaywrightFetcher - Make proxies available without enabling stealth
Thanks for @AbdullahY36
2024-11-26 16:48:35 +02:00
Karim shoair e96e7d4440 Adding the option to use real chrome browser directly 2024-11-24 15:14:42 +02:00
Karim shoair 088117441d Making the type hints more accurate before update 2024-11-24 13:49:31 +02:00
Karim shoair 15b7e3acee Stop using generated headers by browserforge
It turns out its headers format is pretty outdated, which made Google reCaptcha not work sometimes
2024-11-24 13:47:21 +02:00
Karim shoair 7f330efc52 Turn-off the hide_canvas option by default 2024-11-24 13:44:16 +02:00
Karim shoair 073ab2c7e3 Universally handling different response encoding and charsets for all responses
Thanks for @andyfcx
2024-11-23 15:40:41 +02:00
Karim shoair 869412761a Fix for the wait_selector argument resolving to more than 1 element 2024-11-22 22:15:52 +02:00
Karim shoair 19ad82caef Calculate status text manually if it's not returned by PlayWright API 2024-11-20 13:27:18 +02:00
Karim shoair 4c74d9bc97 Fixing a bug with reading response bytes in playwright/camoufox when network_idle is used
PlayWright doesn't provide a way to get the response in bytes after all wait ends like `page.content()` so that's more efficient to do anyway
2024-11-20 12:33:54 +02:00
Karim shoair 572df6b3b4 Fixing the way Response object handles sub items in some edge cases
+ Do it with the least impact on performance
2024-11-16 13:54:55 +02:00
Karim shoair 90e38af552 Correcting the return string for the Response object in all functions/methods 2024-11-15 16:44:47 +02:00
Karim shoair 2abb70218f Adding the proxy support to browser-based Fetchers 2024-11-15 14:43:03 +02:00
Karim shoair d6b454dc43 Corrections and rephrasing 2024-11-11 16:40:30 +02:00
Karim shoair 239e2c73bf Correctly get page content after JS Execution
- Thanks for @AbdullahY36 for the heads-up.

**Update reference** https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event
2024-11-10 16:11:46 +02:00
Karim shoair 43045e3eb2 Get page content after JS Execution
Thanks for @AbdullahY36
2024-11-10 15:54:44 +02:00
Karim shoair 03091beb8b Small clarification 2024-11-09 13:40:50 +02:00
Karim shoair fd7d787ab0 Add extra_headers argument to PW and isolate google referer feature from stealth mode as google_search 2024-11-09 00:54:11 +02:00
Karim shoair 530b54d964 Clearer doc-string 2024-11-09 00:17:41 +02:00
Karim shoair 6cf506cb22 PlaywrightEngine - Validate CDP URLs in all cases 2024-11-06 11:24:56 +02:00
Karim shoair 6497b1b559 Type correction 2024-11-06 02:20:33 +02:00
Karim shoair bd612bb0e2 Updating the disable_resources doc-string 2024-11-04 20:16:04 +02:00
Karim shoair 2ff0fbb0e5 Engines utils - Navigation functions
- Adding doc strings and type annotations stuff.
- Making error messages more detailed.
- Renaming the `construct_websocket_url` function for more clarity.
2024-11-03 22:46:40 +02:00
Karim shoair 3af174526f PlayWright Engine - Doc strings and type annotations stuff 2024-11-03 22:24:44 +02:00
Karim shoair 711de81106 PlaywrightFetcher - The option to drop unnecessary resources requests for speed boost 2024-11-03 16:27:55 +02:00
Karim shoair 145c03daff Big structure changes (check commit description)
- Moved most of the parser functions/files to the core package.
- Converted tools file to a package and made separate files for similar functions.
- Now all fetcher engines return a Response object
- Instead of selecting an engine to use and passing config to it, we have separate fetcher classes so the user can choose what to use while importing.
- I added a new custom fetcher so the user can create and use an engine.
- More...
2024-11-03 01:04:02 +02:00
Karim shoair 8f8d08b568 Adding browsing engines 2024-10-31 02:11:33 +03:00