LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-18-2016, 12:21 PM   #1
kez
LQ Newbie
 
Registered: Aug 2016
Posts: 20

Rep: Reputation: Disabled
Open 4 web sites in different Chrome tabs simultaneously, and search the same term in each site


Hi,

I use Lubuntu which has the Openbox/LXDE desktop.

In the
Code:
lubuntu-rc.xml
configuration file I have the following shortcut configured

Code:
  <keybind key="W-a-slash">
    <action name="Execute"><command>bash -c 'google-chrome --new-window http://www.diy.com;google-chrome http://www.trade-point.co.uk;google-chrome http://www.toolstation.com;google-chrome http://www.screwfix.com'</command></action>
  </keybind>
So when I press the following keys WIN+ALT+/ on my keyboard simultaneously it opens the 4 web sites above, in a new chrome browser.

Does anyone know how to script (or otherwise) enter the same search term into the search box on each page and then search the term. Search term for all pages might be e.g. "circular saw".

In other words, I enter "circular saw", or my chosen search term, in one place, and the search is simultaneously performed across all 4 tabs/ web sites.

Anyone know how to do this?

Last edited by kez; 08-18-2016 at 12:28 PM. Reason: clarification
 
Old 08-18-2016, 12:56 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
erm, Empty Thread?
 
1 members found this post helpful.
Old 08-18-2016, 03:33 PM   #3
kez
LQ Newbie
 
Registered: Aug 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
Here it is

Hi,

I use Lubuntu with the Openbox/LXDE desktop.

In the
Code:
lubuntu-rc.xml
configuration file I have the following shortcut configured

Code:
  <keybind key="W-a-slash">
    <action name="Execute"><command>bash -c 'google-chrome --new-window http://www.diy.com;google-chrome http://www.trade-point.co.uk;google-chrome http://www.toolstation.com;google-chrome http://www.screwfix.com'</command></action>
  </keybind>
So when I do WIN+ALT+/ on my keyboard simultaneously it opens the 4 web sites above.

I want to know how I can script/scrape such that the same search term is entered into the search box shown on the each page e.g. "circular saw".

In other words, I enter "circular saw", or my chosen search term, in one place, and the search is performed in all the above web sites, simultaneously.

Anyone know how to do this?
 
Old 08-19-2016, 05:15 AM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Use google
https://www.google.com/search?q=how+...tion+to+google
 
Old 08-19-2016, 08:37 AM   #5
kez
LQ Newbie
 
Registered: Aug 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
If I wanted to ask someone how to use google, I'd do that.
Are you asking me to say "I've already tried google".
It's simple; any question here can be framed as "try google more".
I'm here, now, on this forum asking the question, if your not interested in helping or can't help skip to the next question.
It's simple.
All who would like to help; I'd welcome all positive ideas.

Quote:
Originally Posted by NevemTeve View Post

Last edited by kez; 08-19-2016 at 08:40 AM.
 
Old 08-19-2016, 11:07 AM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by kez View Post
If I wanted to ask someone how to use google, I'd do that.
Are you asking me to say "I've already tried google".
It's simple; any question here can be framed as "try google more".
I'm here, now, on this forum asking the question, if your not interested in helping or can't help skip to the next question.
It's simple.
All who would like to help; I'd welcome all positive ideas.
The proper answer is "Thank you".

Get offended. Get angered. Get motivated. Get over it.
Google practically types questions for you, so a link to a "how to ask" question is valid.
That's rude. You're asking for help but want to tell us what qualifies as "help"?
But we're to believe your google.fu is sufficient? Yet, here you are.

You got a pair. That's for sure.

Last edited by Habitual; 08-19-2016 at 12:00 PM.
 
Old 08-19-2016, 12:03 PM   #7
kez
LQ Newbie
 
Registered: Aug 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
Guys, "try google" just did not address the question.
There is an interesting question here, are you interested in it?
If anyone has any positive thoughts on the question, please join in.
 
Old 08-19-2016, 12:19 PM   #8
urbanwks
Member
 
Registered: Sep 2003
Distribution: Slackware64-Current, FreeBSD 12.1, Alpine 5.4, Manjaro 19, Alpine on WSL [Win10]
Posts: 194

Rep: Reputation: 213Reputation: 213Reputation: 213
Google, for instance, takes you to search results through the URL you were given above, so something like

Code:
https://www.google.com/search?q=circular+saw
would give you results for "circular saw".

You'd have to find the method for each one of those sites, and pass your search term to the script opening the pages.

But unfortunately you're going to have to go to google.com and research the above further, though that appears to anger you.
 
1 members found this post helpful.
Old 08-19-2016, 12:23 PM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by kez View Post
If I wanted to ask someone how to use google, I'd do that.
Are you asking me to say "I've already tried google".
It's simple; any question here can be framed as "try google more".
I'm here, now, on this forum asking the question, if your not interested in helping or can't help skip to the next question.
It's simple.
All who would like to help; I'd welcome all positive ideas.
lol, the answer to your question is in the link you got so offended at.
try this:
Code:
google-chrome --new-window https://www.google.com/search?q=how+to+pass+question+to+google
 
1 members found this post helpful.
Old 08-19-2016, 12:30 PM   #10
kez
LQ Newbie
 
Registered: Aug 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
"You'd have to find the method for each one of those sites, and pass your search term to the script opening the pages."
Thanks urbanwks, it's the insights into the method(s) for the scripting that I am interested in.
Anyone know how this works?
 
Old 08-19-2016, 12:31 PM   #11
kez
LQ Newbie
 
Registered: Aug 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
lol, the answer to your question is in the link you got so offended at.
try this:
Code:
google-chrome --new-window https://www.google.com/search?q=how+to+pass+question+to+google
That's really funny haha. Humour or answering the question will go every time. hahaha. Nice one. But it does not answer the question. It's Friday night right? haha

Last edited by kez; 08-19-2016 at 12:33 PM.
 
Old 08-19-2016, 12:42 PM   #12
kez
LQ Newbie
 
Registered: Aug 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
I suppose what I want to do could look something like this:
1. press a key stroke sequence on the keyboard, such that this keystroke sequence ..
2. opens 4 tabs in a new chrome browser window, these 4 tabs each being
www.diy.com www.trade-point.co.uk www.toolstation.com www.screwfix.com
3. and somehow, the same search term is then passed to each search box in each of the above web pages, each returning a search result

Last edited by kez; 08-19-2016 at 01:44 PM.
 
Old 08-19-2016, 01:51 PM   #13
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
New Chrome Instance with 4 pre-defined tabs open
Code:
google-chrome --new-window http://www.diy.com --new-tab http://www.trade-point.co.uk --new-tab http://www.toolstation.com --new-tab http://www.screwfix.com
I suppose autokey or some such is the next required "help" step. (That's a hint)

Get some.

Last edited by Habitual; 08-19-2016 at 02:00 PM.
 
Old 08-19-2016, 02:13 PM   #14
kez
LQ Newbie
 
Registered: Aug 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
Thanks Habitual. Something like autokey is not a bad idea. But I don't think it is quite dynamic enough. A search term will likely have to be grabbed dynamically, perhaps in a pop-up, because almost anything could go in the search. May be someone in this programming forum has some ideas. I'm here because I don't know how to do this, and this forum is called 'Programming'.
 
Old 08-19-2016, 03:35 PM   #15
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by kez View Post
Thanks Habitual. Something like autokey is not a bad idea. But I don't think it is quite dynamic enough. A search term will likely have to be grabbed dynamically, perhaps in a pop-up, because almost anything could go in the search. May be someone in this programming forum has some ideas. I'm here because I don't know how to do this, and this forum is called 'Programming'.
You're welcome.

I meant autokey just for the launcher (vs. .desktop entry)..
All that's left is manipulate the pages in our four shiny new tabs.

Greasemonkey was popular on Firefox.
Tampermonkey may be the next candidate.

Last edited by Habitual; 08-19-2016 at 03:38 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Firefox easily outperforms Chrome with many tabs open LXer Syndicated Linux News 0 08-05-2011 07:50 AM
Help for Search of LinuxQuestions.org Web Site Lloyd Ewing Linux - Newbie 4 11-29-2008 12:33 AM
LXer: Adding search to your Web site with Xapian and Omega LXer Syndicated Linux News 0 10-04-2008 06:12 AM
LXer: 4 Percent of My Site Visitors Run Google Chrome Web Browser LXer Syndicated Linux News 0 09-10-2008 03:00 PM
LXer: Web site helps you log-on to subscription sites and conceal identity LXer Syndicated Linux News 0 02-14-2006 11:01 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration