Parsing (scraping) OpenGraph Tags from html HEAD

Sannyasin Brahmanathaswami brahma at hindu.org
Sun Jul 30 12:49:43 EDT 2017


" delimiters can now be more than a single character."

Hmm, that completely did not cross my mind… awesome..  

 

On 7/29/17, 5:36 PM, "use-livecode on behalf of J. Landman Gay via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:

    Here's where it's handy that delimiters can now be more than a single 
    character. This should extract the lines you need regardless of whether 
    they contain carriage returns or not:
    
    
    on parseHeader pData
       set the lineDel to "<meta property="
       repeat for each line l in pData
         if l contains "og:" then put char 1 to offset(">",l)-1 of l & cr 
    after tList
       end repeat
       -- do something with tList
    end parseHeader



More information about the use-livecode mailing list