Hi all,
Is there a way to get ubot to count characters when scraping the content?
I looked for a javascript but i had no luck finding one.
What i need is something that count characters,so if i scrape a 1000 char long text i want to set ubot to use 400 chars when posting to my short description field and use the rest of the 600 chars on the full description field.
The best option would be to count the chars when scraping so that i get one short and one long description but i guess scraping the whole text would also work as long as ubot can splitt up the text to 400 and 600 before posing it on my website.
Get ubot to count characters?
Started by beatngu, Mar 14 2012 04:12 AM
2 replies to this topic
#1
Posted 14 March 2012 - 04:12 AM
KARMA is a B*ICH ![]()
#2
Posted 14 March 2012 - 04:56 AM
You could scrape using the substring function (0,400):
ui stat monitor("# of Chars: ", $text length(#text))
navigate("http://www.lipsum.com/", "Wait")
click(<name="generate">, "Left Click", "No")
wait(3)
set(#text, $substring($scrape attribute(<id="lipsum">, "innertext"), 0, 400), "Global")
John
ui stat monitor("# of Chars: ", $text length(#text))
navigate("http://www.lipsum.com/", "Wait")
click(<name="generate">, "Left Click", "No")
wait(3)
set(#text, $substring($scrape attribute(<id="lipsum">, "innertext"), 0, 400), "Global")
John
#3
Posted 14 March 2012 - 08:07 AM
Thanks,to be honest i have never used that substring command.
KARMA is a B*ICH ![]()
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











