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.
I wanted to rewrite a part of the extractor to include some useful keywords that weren't exposed before and also redo how they're named as to be more consistent with other extractors.
I don't know if the method is sound, but I build a template dictionary with keys that I want to have in keywords, then with
_build_new_dict
, it goes through the specified keys/subkeys from_template_post
recursively and returns a newly-built dictionary. I did it this way as it seems for Fantia specifically, there's a lot of garbage in the response that the previous implementation got around by manually specifying what they wanted. While I could've also implemented the keywords like before manually, I thought this might be a little more flexible.Apologies in advanced as I'm a very novice coder! Let me know if it looks okay.