Pergunta

So, I have my current bot (Yes, this bot is entirely legal. It's just a web scraper-esque bot) extracting data from a web page in a loop. But, at the beginning of the loop, I want it to be able to look through the previously-extracted data and compare it to the data on the page to choose what I want to do next. Is this possible?

For example:

Data is saved like this: name1,100,name2,200 Where names can be any string of letters, and the numbers can be any string of numbers.

To give you an idea on what the page looks like: It has two names, each with values under them, and buttons. The names and values change every minute or so.

  • First, we check the current names on the page. (There are two names on the page)
  • Next, we compare them to our database to see if they reside in it.
  • If they both do, we check the numbers after the name
  • If the first names number is higher than the seconds, we click the first names button
  • If the second names number is higher than the firsts, we click the second names button
  • Now we wait twenty seconds
  • Now, new values have appeared for both names. We find the mean of the new values presented to us and the old values, by adding them together and dividing by two.

What I really need help on is how to search through the CSV file for the names and then numbers after the names, and then how to save data to the same spot as the old data was from.

I know that this is easily possible in most programming languages (Java, C++, etc etc) but I wasn't sure if it would be possible in iMacros.

Foi útil?

Solução

you can't save data in same csv as you use for search in imacros.

in regular imacros you do not have loop inside loop and IF statements as well, so you need to switch to javascript or similar.

extracting data from csv is simple: http://wiki.imacros.net/!COLn

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top