mugglu 1 Posted August 17, 2015 Report Share Posted August 17, 2015 i have added an image marking which part i want to scrape. is it possible to copy everything between two txt like A ''this words i want to scrape'' B Quote Link to post Share on other sites
deliter 203 Posted August 17, 2015 Report Share Posted August 17, 2015 set(#child,"","Global")set(#position,0,"Global")loop while($comparison($find regular expression($scrape attribute($element offset(<(tagname="p" OR id="toc")>,#position),"innertext"),".+"),"> Greater than",$nothing)) { set(#child,"{#child}{$new line}{$scrape attribute($element offset(<(tagname="p" OR id="toc")>,#position),"innertext")}","Global") increment(#position)} How this works is wiki has all paragraphs on the page within a p tag,the contents box has an ID of toc,the scrape attribute we are looking for is the innertext of p,but before an id of TOC,I do not undertand the element child/siblings function to well,there is probably a better way of doing it,to make sure we only get the p tags before the content box,Ive added in to look for innertext of p but before an id of toc and return the innertext(id of toc will not return any innertext) so once the loop gets a result of nothing it stops looping Quote Link to post Share on other sites
addy196 9 Posted September 6, 2015 Report Share Posted September 6, 2015 Quote Link to post Share on other sites
deliter 203 Posted September 6, 2015 Report Share Posted September 6, 2015 rather than "Roll your Eyes" why not post a better solution? 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.