Re: [WebDNA] Middle Question
This WebDNA talk-list message is from 2015
It keeps the original formatting.
numero = 112011
interpreted = N
texte = --047d7bacc8349072d6050d445e8cContent-Type: text/plain; charset=UTF-8For EndBefore, the docs say: String of text characters to search fordefining the end of the text to be returned. All following text (and theEndBefore text itself) will be ignored. --> this suggests that it shouldignore everything after this, including the stop token itself.so, the block I am trying to remove:
by using : property="og:title" as my starting pointand ideally, I want to use: " / as my end point.According to the docs, I should then get: content="Toronto Star copyeditoredits memo announcing the elimination of copyeditor jobsregardless, it isn't working and it is returning the rest of the page afterthe place where it is supposed to stop. It is not stopping.If I url the start and end, I get the same result - no stoppage.[text]theOutPut=[tcpconnect host=boingboing.net][!][/!][tcpsend skipheader=T]GET /2009/11/07/toronto-star-copyedi.htmlHTTP/1.0[!][/!][UnURL]%0D%0A[/Unurl]Host: boingboing.net[UnURL]%0D%0A%0D%0A[/UnURL][UnURL]%0D%0A[/Unurl][!][/!][/tcpsend][/tcpconnect][/text][text]myProp2=[middlestartafter=[url]property="og:image"[/url]&endbefore=[url]"/[/url]][theOutPut][/middle][/text]myProp2: [myProp2]
Theoretically, I should be able to stop middle on the first quot that itruns into, as opposed to " / and I'd take />, but this breaks middle:[middlestartafter=[url]property="og:image"[/url]&endbefore=[url]/>[/url]][theOutPut][/middle]this I get the same result :[middlestartafter=[url]property="og:image"[/url]&endbefore=[url]/[/url]][theOutPut][/middle]as[middle startafter=[url]property="og:image"[/url]&endbefore=[url]"/[/url]][theOutPut][/middle]and[middlestartafter=[url]property="og:image"[/url]&endbefore=[url]"[/url]][theOutPut][/middle]none of these will stop anything past the endpoint from displaying.... anyideas?d.On Thu, Jan 22, 2015 at 2:24 PM, Kenneth Grome
wrote:> endbefore works from the end of the specified text, thus you> should expect this:>> content="Toronto Star copyeditor edits memo announcing the> elimination of copyeditor jobs" />> > content="http://boingboing.net/2009/11/07/toronto-star-copyedi.html"> />> content="http://craphound.com/images/torstarsubsnit.jpeg">> Regards,> Kenneth Grome> WebDNA Solutions> http://www.webdnasolutions.com> Web Database Systems and Linux Server Management>>> On 01/22/2015 12:52 PM, David Bastedo wrote:> > Is there somebody who can shed some light on the proper use of> > [middle]. It's not behaving as I would expect.> >> > I am attempting to extract open graph meta data from html after> > grabbing it via [tcpconnect]> >> > so here is a sample of what I want to extract:> >> > > > > > > > > > > >> > given this code:> > [text]theOutPut=[tcpconnect host=boingboing.net >][!]> > [/!][tcpsend skipheader=T]GET /2009/11/07/toronto-star-copyedi.html> HTTP/1.0[!]> > [/!][UnURL]%0D%0A[/Unurl]Host: boingboing.net >[UnURL]%0D%0A%0D%0A[/UnURL][UnURL]%0D%0A[/Unurl][!]> > [/!][/tcpsend][/tcpconnect][/text]> >> > [text]myProp=[middle startafter=property="og:title"&endbefore="> /][theOutPut][/middle][/text]> >> > myProp: [myProp]
> >> > I would expect MyPprop to return: content="Toronto Star copyeditor> edits memo announcing the elimination of copyeditor jobs> >> > but, it is returning: myProp: content="Toronto Star copyeditor> > edits memo announcing the elimination of copyeditor jobs" /> and> > the rest of the page> >> > If I url everything, it doesn't work at all. Theoretically, middle> > is built for exactly this purpose and I should be able to run a> > series of Middles to extract specific og tags that I pre-describe.> >> > i'm using 6.2> >> > Thanks in advance!> >> > d.> >> >> >> > --------------------------------------------------------- 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> ---------------------------------------------------------> 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>>-- David BastedoTen Plus One Communications Inc.http://www.10plus1.com416.277.4499--047d7bacc8349072d6050d445e8cContent-Type: text/html; charset=UTF-8Content-Transfer-Encoding: quoted-printableFor= EndBefore, the docs say: String of text characters to search for defining =the end of the text to=20be returned. All following text (and the EndBefore text itself) will be=20ignored. --> this suggests that it should ignore everything after this, =including the stop token itself.
so, the block I am trying to =remove:
<meta property=3D"og:title" content==3D"Toronto Star copyeditor edits memo announcing the elimination of c=opyeditor jobs" />
by using =: property=3D"og:title" as my starting =point
and ideally, I want to use: " / as my end point.
According to the docs,= I should then get: content=3D="Toronto Star copyeditor edits memo announcing the elimination of copy=editor jobs
regardless, i=t isn't working and it is returning the rest of the page after the plac=e where it is supposed to stop. It is not stopping.
If I url the start and end, I get the same result - no stoppage=.
[text]theOutPut=3D[tcpconnect host=3Dboingboing.net][!]
[/!][tcpsend skipheader=3DT]GET /200=9/11/07/toronto-star-copyedi.html HTTP/1.0[!]
[/!][UnURL]%0D%0A[/Unurl]H=ost: boingboing.net[UnURL]%0D%0A%0D%0=A[/UnURL][UnURL]%0D%0A[/Unurl][!]
[/!][/tcpsend][/tcpconnect][/text]
=
[text]myProp2=3D[middle startafter=3D[url]property=3D"og:image&quo=t;[/url]&endbefore=3D[url]" /[/url]][theOutPut][/middle][/text]=C2==A0
myProp2: [myProp2]<br />
Theoretically, I should be able to stop middle on the first quot th=at it runs into, as opposed to " / and I'd take />, but this br=eaks middle:
[middle startafter=3D[url]property=3D"og:image&quo=t;[/url]&endbefore=3D[url]/>[/url]][theOutPut][/middle]
this I get the same result :
[middle startaft=er=3D[url]property=3D"og:image"[/url]&endbefore=3D[url]/[/url=]][theOutPut][/middle]
as
=
[middle startafter=3D[url]property=3D"og:image"=;[/url]&endbefore=3D[url]" /[/url]][theOutPut][/middle]
and
[middle start=after=3D[url]property=3D"og:image"[/url]&endbefore=3D[url]&qu=ot;[/url]][theOutPut][/middle]none of these will s=top anything past the endpoint from displaying....=C2=A0 any ideas?
=
d.
--047d7bacc8349072d6050d445e8c--
Associated Messages, from the most recent to the oldest: