Skip to content

Conversation

@Finalet
Copy link

@Finalet Finalet commented Aug 6, 2023

All selectors (titleSelector, linkSelector, snippetSelector, resultStatsSelector, cursorSelector) where exposed via the config object passed to googleIt(). For some reason, titleFinder was not exposed, which did not allow changing it to adapt the html parser to a new Google Search page structure.

In this PR I exposed titleFinder in the same way as all selectors were. Now, you can change all parameters allowing you to parse the updated Google Search page.

Something to look out for:

  • Build lib commit - me running npm run build, but looks like it reformats a lot of unrelated code. Different version of Babel? Let me know how to proceed.
  • getResults test fails. For some reason, the getResults function in the test returns 0 results. Meanwhile, googleIt() works fine when using the library itself. This test was failing even before my changes, so something must have been broken prior.

Please consider merging changes in Exposed titleFinder to allow providing your own since they fix functionality of this library. Sometimes Google returns a new style of the search page, so it is important to provide your own selectors and titleFinder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant