A maintenance update with many significant changes and possible breaking changes
- Solved all encoding issues by using a better approach which will handle web pages where encoding is not correctly declared (Thanks to @Kemsty2's efforts for pointing that out in #110 #111 )
- Solved a logical issue with overriding session-level parameters with request-level parameters in all browser-based fetchers that was present since v0.3
- Fixed the signatures of the shortcuts in the interactive web scraping shell, which made a perfect autocompletion experience for the shortcuts in the shell. This issue has been present since v0.3 as well.
- Pumped up the version for the Maxmind database, which will improve the
geoipargument forStealthyFetcherand its session classes. - Updated all used browser versions to the latest available ones.
- BREAKING - all fetchers had gone through a big refactor, which resulted in some interesting things that might break your code:
- Scrapling codebase is now smaller by ~750 lines and many changes which would make maintenance very much easier in the future and use a bit less resources.
- The validation for all fetchers and their session classes became much faster, which will reflect on their overall speed.
- To achieve this, now all fetchers can't accept standard arguments other than the
urlargument; the rest of the arguments must be keyword-arguments so your code must be likeFetcher.get('https://google.com', stealthy_headers=True)notFetcher.get('https://google.com', True)if you were doing that for some reason! - An annoying difference between browser-based fetchers and their session classes since v0.3 was that the argument used to pass custom parser settings per request was called
custom_config, while it was namedselector_configin the session classes. This refactor allowed us to unify the naming toselector_configwithout breaking your code, so the main one is nowselector_configwith backward compatibility for thecustom_configargument. The autocompletion support will be available only for theselector_configargument. - Also, to achieve all of this, we had to make the type hints of the fetchers' functions dynamically generated, so if you don't get a proper autocompletion in your IDE, make sure you are using a modern version of it. We have tested almost all known IDEs/editors.
We have also updated all benchmark tables with the current numbers against the latest versions of all alternative libraries.
🙏 Special thanks to our Discord community for all the continuous testing and feedback




