Jump to content

Hey guys

I just get my first intership. In my job I need use some data and search it online( it kind like google search,i need type data in the search bar, and it will show me the data i need). I think it is easily can be done by automation tool. I was wonder of you guys have any suggestion for any software i can use. I was think about the autohotkey

 

Here is what i want the script to do, export the data from a excel sheet, put it in to a search bar in a website, get the data i need and input them to the excel sheet

 

Hope you all have a good day.

Link to comment
https://linustechtips.com/topic/890452-automation-tool/
Share on other sites

Link to post
Share on other sites

In theory you could do that with AHK. But seems like you aren't getting info from same spot all the time. Which means that you have two macros you can make. One where it copies selected cell in excel and does the search. And second where it pastes copied stuff in correct place. Probably could be done if you know your way around with AHK.

 

And if you can install stuff on your work PC. AHK needs admin rights to be run. Your job also sounds just another manual labor job they make interns do. It depends much about your supervisors if they are all for you making things easier, or if they want you to build up character by doing same manual labor everyone else has done in past.

^^^^ That's my post ^^^^
<-- This is me --- That's your scrollbar -->
vvvv Who's there? vvvv

Link to comment
https://linustechtips.com/topic/890452-automation-tool/#findComment-10984300
Share on other sites

Link to post
Share on other sites

Sounds like it would be much easier in Python or something similar to be fair, vs something like AHK.

 

In Python you can use various tools to load excel files, I've used Pandas before, which just has a "read_excel()" function.

Then you'd need a loop over all the data in the file, to pull out the field you wanted. Pandas makes that really easy since you can just reference the column header.

Next you'd do one of two things to submit the search to the site:

  1. If the site is nice, you might be able to edit the URL directly with the search term. Ie for this site, If I search for "computers" I get a link of "https://linustechtips.com/main/search/?type=all&q=computer", which you can see just has the word "computers" on the end. So you'd just edit the link to be "https://linustechtips.com/main/search/?type=all&q=MYSEARCHTERM", where the last bit is the bit you want to search. Might need to be wrapped in function call to remove spaces etc, which aren't valid in URLs. You'd then load that URL and there you have the search results.
  2. If that isn't the case....You might need to load the site manually using a tool such as scrapy (I think? Not used it in a while) which would then let you navigate the site more normally, such that you can submit the search term that way.

Either way, you end up with the search results loaded. You can then strip away the unneeded bits, put them into a pandas dataframe, and then call save.

I'd assume that would be quicker and more reliable than an AHK script.

CPU: 6700k GPU: Zotac RTX 2070 S RAM: 16GB 3200MHz  SSD: 2x1TB M.2  Case: DAN Case A4

Link to comment
https://linustechtips.com/topic/890452-automation-tool/#findComment-10984715
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×