Fixed TheGamesDB scraper by adding a document tree segment 'scrapers' to the config file #802
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.
This allows the user to pass an API key for the gamesdb scraper. It works by letting users add scraper configurations to es_systems.cfg (maybe not the right place?)
Here's an example of what the segment looks like:
The idea is try to make scrapers as configurable as possible, but at the moment the only valid name is
gamesdb
and the only used child element of a scraper is<APIKEY>
. The code I have works, but obviously this needs to be cleaned up.For one thing, ratings, developers, publishers and genres aren't yet supported.For another, it's a long way from truly configurable. But hopefully this is a good enough starting point for some feedback.Update
Basic support for scraping developers, publishers and genres has been added. Currently, there doesn't appear to be a way to access ratings through the TheGamesDB API. Fetching each requires a minimum of 3 synchronous API requests, at the moment. I expect that I'll want to make those asynchronous - similar to the image/thumbnail fetches - in the future. But it's a bit more complex than those because the fetched information is share-able between all games scraped with that scraper.
But I digress. Next up is refining the configuration files a bit.