Re: [WebDNA] Middle Question
This WebDNA talk-list message is from 2015
It keeps the original formatting.
numero = 112034
interpreted = N
texte = It seems to me this can be done with [regex]. Wait for 8.0.3- chris> On 23 Jan 2015, at 19:29, David Bastedo
wrote:>=20> Thanks Ken & Tom,>=20> as soon as I understood what Ken was saying, I knew what I want to do =is impossible>=20> I literally want to pluck open graph or other meta data off of a page, =no matter where it is by just using its tag and an end point.>=20> If I know what tags I am looking for explicitly - I could put them in =a table and loop through looking for whatever I wanted, then I could =define the end - working "forward" from the opening of the tag "og: =title" for example, and end at the close of the tag "/" and be able to =pull out dynamically any meta tag I could possibly think of.... or want.>=20> That would be pretty straight forward and very powerful.> I can accomplish this task by creating a one off relationship between =a page and its tags - say for twitter - its an easy way to grab an image =- but its not dynamic I want to do this for any type of page.>=20> d.>=20> On Fri, Jan 23, 2015 at 7:35 AM, Tom Duke =wrote:> David,>=20> Hi - you won't be able to achieve what you are trying to do with =[middle]. You might be able to hack something together using [grep] or =[listwords]. Though Stackoverflow is full of articles outlining why =regex should not be used to parse HTML. =(http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-x=html-self-contained-tags/1732454#1732454)>=20> Your example shows why a proper HTML parser within WebDNA would be =really useful. For example if you paste your code into this page:>=20> http://try.jsoup.org>=20> and type "meta" into the CSS Query box you'll see how a HTML parser =does the job.>=20> - Tom>=20>=20>=20>=20>=20>=20> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D> Digital Revolutionaries> 1st Floor, Castleriver House> 14-15 Parliament Street> Temple Bar,Dublin 2> Ireland> ----------------------------------------------> [t]: + 353 1 4403907> [e]: > [w]: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>=20> On 23 January 2015 at 00:11, David Bastedo wrote:> To your point, I never switched out your test variable properly=20> To my point, I hate when you are right.> I get the same results.>=20> However, as opposed to blaming me for not understanding how the =friggin thing works, the docs aren't very clear and after seeing your =example I now understand "backwards" for the reality that it is.>=20> There is no hope in hell of doing what I want with middle.>=20> Your first example is not as good as your second example to illustrate =the concept. Thank you for taking the time with the second example, it =illustrate backwards much more effectively.>=20> d.>=20>=20> --------------------------------------------------------- This message =is sent to you because you are subscribed to the mailing list . To =unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us>=20> --------------------------------------------------------- This message =is sent to you because you are subscribed to the mailing list . To =unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us>=20>=20>=20> --=20> David Bastedo> Ten Plus One Communications Inc.> http://www.10plus1.com> 416.277.4499>=20> --------------------------------------------------------- This message =is sent to you because you are subscribed to the mailing list . To =unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us
Associated Messages, from the most recent to the oldest:
It seems to me this can be done with [regex]. Wait for 8.0.3- chris> On 23 Jan 2015, at 19:29, David Bastedo wrote:>=20> Thanks Ken & Tom,>=20> as soon as I understood what Ken was saying, I knew what I want to do =is impossible>=20> I literally want to pluck open graph or other meta data off of a page, =no matter where it is by just using its tag and an end point.>=20> If I know what tags I am looking for explicitly - I could put them in =a table and loop through looking for whatever I wanted, then I could =define the end - working "forward" from the opening of the tag "og: =title" for example, and end at the close of the tag "/" and be able to =pull out dynamically any meta tag I could possibly think of.... or want.>=20> That would be pretty straight forward and very powerful.> I can accomplish this task by creating a one off relationship between =a page and its tags - say for twitter - its an easy way to grab an image =- but its not dynamic I want to do this for any type of page.>=20> d.>=20> On Fri, Jan 23, 2015 at 7:35 AM, Tom Duke =wrote:> David,>=20> Hi - you won't be able to achieve what you are trying to do with =[middle]. You might be able to hack something together using [grep] or =[listwords]. Though Stackoverflow is full of articles outlining why =regex should not be used to parse HTML. =(http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-x=html-self-contained-tags/1732454#1732454)>=20> Your example shows why a proper HTML parser within WebDNA would be =really useful. For example if you paste your code into this page:>=20> http://try.jsoup.org>=20> and type "meta" into the CSS Query box you'll see how a HTML parser =does the job.>=20> - Tom>=20>=20>=20>=20>=20>=20> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D> Digital Revolutionaries> 1st Floor, Castleriver House> 14-15 Parliament Street> Temple Bar,Dublin 2> Ireland> ----------------------------------------------> [t]: + 353 1 4403907> [e]: > [w]: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>=20> On 23 January 2015 at 00:11, David Bastedo wrote:> To your point, I never switched out your test variable properly=20> To my point, I hate when you are right.> I get the same results.>=20> However, as opposed to blaming me for not understanding how the =friggin thing works, the docs aren't very clear and after seeing your =example I now understand "backwards" for the reality that it is.>=20> There is no hope in hell of doing what I want with middle.>=20> Your first example is not as good as your second example to illustrate =the concept. Thank you for taking the time with the second example, it =illustrate backwards much more effectively.>=20> d.>=20>=20> --------------------------------------------------------- This message =is sent to you because you are subscribed to the mailing list . To =unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us>=20> --------------------------------------------------------- This message =is sent to you because you are subscribed to the mailing list . To =unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us>=20>=20>=20> --=20> David Bastedo> Ten Plus One Communications Inc.> http://www.10plus1.com> 416.277.4499>=20> --------------------------------------------------------- This message =is sent to you because you are subscribed to the mailing list . To =unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us
christophe.billiottet@webdna.us
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
popups, netscape vs explorer (1997)
And/or Search (1998)
TCPConnect / Current Temperature (2004)
RAM variables (1997)
WebCatalog/WebMerchant Manuals Available (1998)
Signal Raised Error (1997)
[BULK] [WebDNA] set HTTP-Status Code from webdna (2016)
payflowpro problem #2 (2003)
Re:Emailer and encryption (1997)
quotation marks (2004)
Merging databases (1997)
Insert Line Feed Character (2004)
declined orders webmerchant not showing up? (2005)
Question about links (1999)
& in Lookups (1997)
Slow wiht MAC OS and Webstar IV (2002)
WebCatalog and Macromedia Flash (1998)
[OT] Form POSTing with LONG variable (2007)
Help!!!! Purchases not going through! (1997)
problems with 2 tags (1997)