deiseldent 0 Posted June 6, 2013 Report Share Posted June 6, 2013 Fellow UBotters... Can anyone explain the best way to accomplish what I am trying to do in the below picture? I am pretty sure I am going to have to play with regex, however maybe someone out there knows a more friendlier approach to removing half the content from an item? thanks in advance DD http://derekdawson.com/wp-content/uploads/2013/06/ubot-pic1.jpg Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted June 6, 2013 Report Share Posted June 6, 2013 add it to a separate list first list to list(list from text(scrape attribute)) then loop the first few lines into your main list only. Quote Link to post Share on other sites
deiseldent 0 Posted June 6, 2013 Author Report Share Posted June 6, 2013 Thank for the reply TJ... Unfortunately I have no idea on how to loop the first few lines into my main list? So far I have this add list to list($list from text($scrape attribute($element offset(<class="abstract">, 0), "innertext"), ""), %roughlist, "Delete", "Global")loop while("") {} Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted June 6, 2013 Report Share Posted June 6, 2013 loop while("") {} changed to loop (5) {add item to list here(item is next list item from the scraped list)} Quote Link to post Share on other sites
deiseldent 0 Posted June 6, 2013 Author Report Share Posted June 6, 2013 It's telling me that I "have exceeded the range of the list", I tried a 100 different variations of what you just said and I keep getting an error. I cant even go into code view, because ubot is telling me that I haven't finished editing all the nodes- even though I have. Sorry about being a pest- hopefully that sheds light on something for you thanksDD Quote Link to post Share on other sites
north_star 16 Posted June 6, 2013 Report Share Posted June 6, 2013 Try this. perhaps it could help set(#abstract, $scrape attribute(<class="abstract">, "innertext"), "Global") add list to list(%rought list, $list from text(#abstract, $new line), "Delete", "Global") loop(5) { add item to list(%clear result, $next list item(%rought list), "Delete", "Global") comment("=========== the scrapeed line=====") } 1 Quote Link to post Share on other sites
deiseldent 0 Posted June 6, 2013 Author Report Share Posted June 6, 2013 Thanks North_star That works perfectly! 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.