This repository was archived by the owner on Dec 20, 2025. It is now read-only.
[email protected] #39
Closed
typicalninja
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What's Changed
Major Changes
563bfc4: Update dictionary selectors with accurate definitions (@typicalninja in fix(gsr): Patch dictionary selectors + fix gsr dictionary results #28)
This uses the updated dictionary definitions from google-sr-selectors as a response to google updating their result structure.
Previously, dictionary definitions were returned as a [string, string]. Now, they are returned as an object with the following properties:
Please take steps to update your code to use the new dictionary definition structure.
c332095: Rewrite the api to be customizable (@typicalninja in v4 base rewrite #15/chore: add changeset for rewrite #32)
google-sr has been completely rewritten to be more customizable. It is possible to create your own selector functions and use them to scrape the data you want.
filterResultsoption was replaced byresultTypeswhich accepts a function instead of a string. This allows you to add your own custom selectors to be used as a parser.search({ - filterResults: [ResultTypes.SearchResult] + resultTypes: [] })Check the newly added api documentation here
Minor Changes
5676a7a: Support custom selectors (@typicalninja in refactor: add support for custom selectors #33)
Use the new
ResultNodeTyperto create a custom node, and use theResultSelectorto create a function that will parse the raw html for results and return a node.d98c496: Remove uneeded top level options (@typicalninja in chore: remove uneeded toplevel options #37)
Removed the
safemodetop-level options as the same result can be achieved using the requestConfig option.const queryResult = await search({ - safemode: true, // requestConfig is of type AxiosRequestConfig + requestConfig: { + params: { + // enable "safe mode" + safe: 'active' + }, + }, });Full Changelog: https://github.com/typicalninja/google-sr/blob/master/packages/google-sr/CHANGELOG.md
This discussion was created from the release [email protected].
Beta Was this translation helpful? Give feedback.
All reactions