A way to make the library more robust against selector changes by google #69
download13
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
And just to add to this, we currently use the mobile & desktop version of Google. I think it might be a good idea to use the TV version instead as it rarely ever changes and doesn't use JavaScript to dynamically load content (plus the structure of the page is very very simple compared to the desktop and mobile pages). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It seems like keeping up with selector changes is a big issue for the reliability and maintenance burden of this library (#66 for example).
I wonder if there's a more flexible way of selecting the DOM subtrees that contain the information we want.
I did some searching on the subject and found a paper that discusses ways of finding and matching subtrees within a larger tree structure.
Even a rigid, exact structural match would be more reliable than selectors, since DOM structure generally changes less often than randomly generated class names.
A fuzzy search that is able to tolerate small differences would be still more robust and likely only need modification if google were to do a complete overhaul of their results page structure.
I'm going to read through any papers I can find and see if there's a good way to do this in the context of a DOM tree, then maybe make a pull request. Just thought I'd leave this here in case anyone else had similar thoughts or wants to take over in the quite likely event that I forget about this tomorrow...
Beta Was this translation helpful? Give feedback.
All reactions