Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Google YouTube search link] No longer working after Google's latest update #55

Open
4 of 5 tasks
lednerg opened this issue Mar 22, 2023 · 8 comments
Open
4 of 5 tasks
Labels
bug Something isn't working

Comments

@lednerg
Copy link

lednerg commented Mar 22, 2023

Please ensure:

  • I included in the issue title the script name I'm referring to.
  • I performed a search of the issue tracker and in the relevant Greasyfork feedback page to avoid opening a duplicate issue.
  • The bug is caused by the script itself. It doesn't happen if I disable the script, or in a fresh browser profile.

Include in this issue:

  • Screenshots/video/gif demonstrating the bug, if it’s visual
  • Console errors, if any

Describe the problem and how to replicate it

Google has been changing how their search pages look and the latest version unfortunately breaks this script. They are slowly unveiling the new look, so some people may still be seeing the old one. The new version looks like this:
image

Example URL

https://www.google.com/search?q=test

Script Manager

Violentmonkey

Browser(s) used

Chrome 111

@lednerg lednerg added the bug Something isn't working label Mar 22, 2023
@darkred
Copy link
Owner

darkred commented Mar 22, 2023

Thanks for letting me know. 👍
I still have the old layout so the script is still working fine for me:

When the new look rolls out for me I'll update the script.

@lednerg
Copy link
Author

lednerg commented Apr 12, 2023

image

I've gone ahead and made a new script from scratch which adds buttons for several different searches next to Google's search form. I'm not putting it on a userscripts site because frankly I don't have time to deal with support. You're free to copy it or parts of it if you want. I don't know for sure if it would work on the older version of Google. Maybe it would be cool to have an options window where people could easily change the buttons around. So yeah, use it or don't, and thanks for maintaining the other script!

https://pastebin.com/JqjSbqgY

@lednerg
Copy link
Author

lednerg commented Apr 12, 2023

Of course within hours of me posting that to Pastebin, Google decided to change their search box to a textarea (after 25 years of it being an input), thus breaking the script. Anyway, it's working again now.

@realAzazello
Copy link

realAzazello commented Apr 24, 2023

I've gone ahead and made a new script from scratch which adds buttons for several different searches next to Google's search form. I'm not putting it on a userscripts site because frankly I don't have time to deal with support.

I really like this format: elegant & efficient use of space.

(This is a shoutout to everyone, who ever can assist!)

I'ld like to add a Button to use GSearch for 'site' searches: e.g. I'm trying to make one for HN, but the following formats are not working--

'Search URLs':

'https://www.google.com/', 'search?site%3Anews.ycombinator.com&q='

'search?q=%s+site%3Anews.ycombinator.com'
'search?+site%3Anews.ycombinator.com&q='
'search?complete=0&site%3Anews.ycombinator.com&q='

Then moved 'search?' over to 'Domains', tried:
'https://www.google.com/search?', 'complete=0&site%3Anews.ycombinator.com&q=', 'https://news.ycombinator.com/favicon.ico'

Still no-go. In all cases, the links open a gsearch page with just the vale of 'q=' in the textbox.

@lednerg
Copy link
Author

lednerg commented Apr 25, 2023

I'ld like to add a Button to use GSearch for 'site' searches: e.g. I'm trying to make one for HN, but the following formats are not working--

To do site searches, try this:
'https://www.google.com/', 'search?q=site:news.ycombinator.com '
Include that space at the end. You don't have to worry about using stuff like "%3A" since the script will do that itself.

And to search HN directly, you can do:
'https://hn.algolia.com/', '?q='

@realAzazello
Copy link

To do site searches, try this: 'https://www.google.com/', 'search?q=site:news.ycombinator.com ' Include that space at the end. You don't have to worry about using stuff like "%3A" since the script will do that itself.

Thank you! That works perfectly.

I'm also converting the favicons to base64 embeds -- the calls to the sites' urls every page load are too annoying & inefficient.

@darkred
Copy link
Owner

darkred commented Jul 8, 2023

@lednerg Eventually I got the new layout:
2023-07-08_212029

Unfortunately the buttons no longer have icons (as in the screenshot in your OP).
You see, I was relying to the Google's 'Videos' SVG icon:
2023-07-08_212248
in order to identify the relevant 'Videos' node for the various Google localizations. That's unfortunately no longer possible.

So, I have deleted the script from Greasyfork. When/if I find a solution I'll update and restore it.
I'm always open for PR of course.

Side note:

the buttons now are displayed in two steps, not all at once, e.g. initially:
2023-07-08_212642
and then as in my former screenshot. This also complicates things.

@darkred darkred changed the title [Google_youtube_search_link] <No longer working after Google's latest update> [Google YouTube search link] No longer working after Google's latest update Jul 9, 2023
@alpe12
Copy link

alpe12 commented Aug 9, 2023

@darkred
I think video search links always have &tbm=vid.
So you could probably use something like:
document.querySelectorAll('a[href*="&tbm=vid"]')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants