January 18, 201510 yr Hello I have been succeeding at scraping my web URL and getting what I need. I ran into difficulty that I have been working on but I can't figure out how to do something on this web URL I am looking to web scrape the Youtube URL and the vimeo http://www.usachurches.org/church/the-miracle-center-san-antonio.htm and twitter URL from another page http://www.usachurches.org/church/new-life-covenant-church-se.htm When I go to the twitter field where the url should go I get tml> <!-- HTML5 Boilerplate --> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 I have tried everyway to get the areas enclosed I want to grab but It gives me bad answers. I am using Let ( [ text = GetLayoutObjectAttribute ( "webwindow" ; "content" ) ; prefix ="_blank" href=""; suffix = "</"; start = Position ( text ; prefix ; 1 ; 1 ) + Length ( prefix ) ; end = Position ( text ; suffix ; start ; 1 ) ] ; Middle ( text ; start ; end - start ) ) for youtube I am using Let ( [ text = GetLayoutObjectAttribute ( "webwindow" ; "content" ) ; prefix ="_blank"href="; suffix = "">"; start = Position ( text ; prefix ; 1 ; 1 ) + Length ( prefix ) ; end = Position ( text ; suffix ; start ; 1 ) ] ; Middle ( text ; start ; end - start ) ) For twitter and I am using Let ( [ text = GetLayoutObjectAttribute ( "webwindow" ; "content" ) ; prefix =""nofollow " target="_blank" href=""; suffix = "<"; start = Position ( text ; prefix ; 1 ; 1 ) + Length ( prefix ) ; end = Position ( text ; suffix ; start ; 1 ) ] ; Middle ( text ; start ; end - start ) ) for Vimeo I have been able to apply everything with all the other fields and they all work fine. I understand the concept now but I can't figure out the enclosures to grab the urls. Any help would be greatly appreciated. Thank you
January 19, 201510 yr if I understand your question... for Twitter, you're wanting the calculation to return what, in your second link, would be twitter.com/nlcsoutheast this works. Let ( [ original = GetLayoutObjectAttribute ( "webwindow" ; "content" ) ; twitterpos = Position ( original; "twitter.com" ; 1; 1); twitterend = Position (original; """ ; twitterpos; 1) ] ; Middle ( original ; twitterpos ; twitterend - twitterpos ) )
January 19, 201510 yr Author Thank you very much. That worked like a charm with vimeo and youtube. You have extended my understanding. Thanks again
Create an account or sign in to comment