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

data18 doesn't work #735

Open
ewq1555 opened this issue Nov 23, 2024 · 3 comments
Open

data18 doesn't work #735

ewq1555 opened this issue Nov 23, 2024 · 3 comments

Comments

@ewq1555
Copy link

ewq1555 commented Nov 23, 2024

https://www.data18.com/name/{searchTerms} is not enough.

Chatgpt didn't help. Here's chatgpt's suggestion.

"Post-Search Script: Use this updated Post-Search Script to apply the transformation to the term before it's encoded by the browser or extension:

let searchTerm = params.terms; // Get the current search term
searchTerm = searchTerm.replace(/\s+/g, '-'); // Replace spaces with hyphens
searchTerm = searchTerm.toLowerCase(); // Convert to lowercase

params.terms = searchTerm; // Set the modified term back to params.terms

// Now, manually update the URL without relying on the template encoding
params.url = params.url.replace("{searchTerms}", params.terms);

Explanation:
Replace spaces with hyphens (searchTerm.replace(/\s+/g, '-')).
Convert to lowercase (searchTerm.toLowerCase()).
Force the URL to update with the modified search term before it’s encoded."

But I get "https://www.data18.com/name/Adriana%20Chechik" instead of https://www.data18.com/name/adriana-chechik

"Selection Search" worked with only changing data18 url to "https://www.data18.com/name/{%s|replace:/\s+/-/g|lower}" but this extension doesn't have that option. Problem with Selection Search is that it doesn't have Multiple Links Search function.
Chatgpt told me to write a tampermonkey script but it didn't work and data18 page kept refreshing itself.

@ssborbis
Copy link
Owner

Try

Template
https://www.data18.com/name/%sl

Modify Terms Regex
/\s+/-/g

@ewq1555
Copy link
Author

ewq1555 commented Nov 23, 2024

Try

Template https://www.data18.com/name/%sl

Modify Terms Regex /\s+/-/g

This happened

https://www.data18.com/name/adriana-chechikhttps://www.data18.com/name/adriana-chechikhttps://www.data18.com/name/adriana-chechik

also some urls are outdated,

https://www.youtube.com/results?search_query={searchTerms}
https://en.wikipedia.org/wiki/Special:Search?search={searchTerms}

these are from Swift Selection Search and they are much more clean and up to date urls.

edit:
Also "Add new search engines simply with a right-click" doesn't work properly. I did it and it added this link https://www.babepedia.com/search/?search_term_string={searchTerms} but it
doesn't work, I had to change the url to https://www.babepedia.com/search/{searchTerms} which I got from Swift Selection Search.

@ssborbis
Copy link
Owner

ssborbis commented Dec 3, 2024

What search terms are you using? I don't know how you're getting those result URLs from search terms. It's like the URL is duplicated 3 times. If you use Adriana Chechik as your search, what happens?

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

No branches or pull requests

2 participants