Fix New Republic and Scientific American recipes#4
Open
holyspiritomb wants to merge 3 commits intoping:mainfrom
Open
Fix New Republic and Scientific American recipes#4holyspiritomb wants to merge 3 commits intoping:mainfrom
holyspiritomb wants to merge 3 commits intoping:mainfrom
Conversation
Amend more tag classes
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explanation for New Republic
The New Republic recipe started showing HTTP 400 errors when attempting to download any article endpoints.
When an endpoint URI was input into a browser, the server gave this error message:
{"errors":[{"message":"Cannot query field \"captionText\" on type \"GalleryData\".","locations":[{"line":71,"column":7}],"extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}},{"message":"Cannot query field \"creditText\" on type \"GalleryData\".","locations":[{"line":72,"column":7}],"extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}]}If I am understanding the error correctly, the New Republic recipe has fields in the query that don't appear to exist in the news site's database.
This pull request will remove the specific fields named in the above error message from the recipe's query, which enables the recipe to fetch articles again.
Explanation for Scientific American
Scientific American has changed its CSS classes. This pull request updates the
keep_only_tagsandextra_cssaccordingly, and updates the recipe to find each article's script ld+json element.