-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New module structure #22
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All counter classes, with the exception of WorldCounters, are now dataclasses and are encapsulated within WorldCounters. This will make it easier to manage the data state without having to render the page in every instance.
changes: - HTTPRequester -> Browser. This makes a lot more sense as the class doesn't just perform http requests. - Removal of base_url and timeout attributes. Both will be sent to the get_page_content method. - Separation of the responsibilities of rendering and executing a script injected into an html page for the render_page and run_js_script methods.
changes: - new_headers arg to new_column_names - upd type hint of new_column_names arg from nested list to nested tuple
regions: Asia Africa Europe Latin American And The Caribbean Northern American Oceania
Implemented APIs to get countries from all regions of the world: - World Countries; - Asia Countries; - Africa Countries; - Europe Countries; - Latin American And The Caribbean Countries; - Northern American Countries; - Oceania Countries.
Merged
matheusfelipeog
added a commit
that referenced
this pull request
Oct 25, 2023
## Added - **New module structure (#22)** - new scraper module; - new world module for public api; - get home page counters, like in the old api, but now having a special data class; - get population and geography data; - set new dependencies; - new mapped pages; - add some tests. - **Add docstrings to the new api (#23)** - **Define explicit fields in all counter dataclasses (#26)** ## Changed - **Reformulation of all docs (#24)** - new fully documented API; - new package logo and icon. - **Use the new API in the old core module. This is a temporary measure until the module is completely removed. (#25)** - warn about the deprecation of the old API and indicate the use of the new one. - **Update all project metadata (#27)** - **Change package manager and add action to run tests (#29)** - **Support only Python `>=3.9, <3.12` (#29)** ## Removed - **Removed support for Python 3.7 and 3.8 (#29)** ## Deprecated - **`worldometer.core` and `worldometer.api` deprecated (#25)** ## Fixed - **Fix old API (#25)** - fix: import "requests_html" could not be resolved (#12) - fix: problem with Importing and Crashing (#13) - fix: issue with "sanitize_metrics" method (#18) - fix: navigation Timeout Exceeded Error (#20) - fix: import error (#21)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improvements
Define and implement new module structure:
scraper
module;world
module for public api;Mapped pages