webpro 31 Posted October 14, 2013 Report Share Posted October 14, 2013 Is there a way to extract from a list, with one item only ?Or split what's in a list, under one item only ? The problem is, i got a %list which sometimes winds up with 2 urls in it (shows up as one item).So it's got the same position, which is zero.Of course, if i navigate to it it doesn't workhttp://www.whatever.com/nice.htmhttp://whatever.com/hot.htm I'm trying to find a way to split them or extract one of them from the list. Thanks Quote Link to post Share on other sites
UBotDev 276 Posted October 14, 2013 Report Share Posted October 14, 2013 I think you should prevent that from being added to the list initially...so you end up with clean list. However, I think the simplest way to get multiple URLs from a single string is: add list to list(%URLs, $list from text("http://www.whatever.com/nice.htmhttp://whatever.com/hot.htm", "http://"), "Delete", "Global") Quote Link to post Share on other sites
webpro 31 Posted October 14, 2013 Author Report Share Posted October 14, 2013 tHANKS uBOTdEV Yeah i know but i'm stuck.I did the best i could with regex to scrape everything but i still get this issue here and then. I'll try this. Tomorrow (i'm dead !!!)Thanks again Quote Link to post Share on other sites
webpro 31 Posted October 14, 2013 Author Report Share Posted October 14, 2013 Cool this works ! Now i need to find a way to tell the bot to navigate from position 1 (if any) as one of the url winds up into position 1 (position 0 still got both urls) I tried:IF $EXISTS $LIST ITEM %URLS2 POSITION #1THEN NAVIGATE $LIST ITEM %URLS2 POSITION #1 but i get an INVALID PARAMETER Of course if i try to navigate from position 0I get both urls mixed upex:http://site.com/http://site2.com Quote Link to post Share on other sites
stanf 43 Posted October 14, 2013 Report Share Posted October 14, 2013 Just a suggestionAfter your list is biult,run thru the list to clean it up.If your error is constant "htmhttp" or" htmlhttp" why not code a if/else test?Set listCheck list = next list itemIf checklist contains "htmlhttp"Spit it in the middle Else if checklist contains "htmhttp"Split in the middle Quote Link to post Share on other sites
webpro 31 Posted October 15, 2013 Author Report Share Posted October 15, 2013 Hummm i seeThanks mate Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.