Re: [WebDNA] How to Grab link

This WebDNA talk-list message is from

2014


It keeps the original formatting.
numero = 111365
interpreted = N
texte = --047d7b8736eceda51604f930aecf Content-Type: multipart/alternative; boundary=047d7b8736eceda51304f930aece --047d7b8736eceda51304f930aece Content-Type: text/plain; charset=UTF-8 Thanks Tom this will give me the direction to go! Lawrence 2014-05-09 11:28 GMT+02:00 Tom Duke : > Lawrence, > > Here's some test code I have been working on to enable link tracking for > HTML emails. You might be able to pull out parts of it to sort your issue. > > - Tom > > > > > [!] > > > [/!][!] > > > ------------------------------------ > ### Set the input html variable ### > > [/!][text]inputHtml=your_input_html_goes_here[/text][!] > > [/!][text]sCAMPAIGNID=123456789[/text][!] > > [/!][closedatabase db=massmailerLinks.db][!] > > > > ------------------------------------ > ### Step One: delete all existing links related to this email ### > > [/!][delete db=massmailerLinks.db&eqsCAMPAIGNIDdatarq=[sCAMPAIGNID]][!] > > > ------------------------------------ > ### Step Two: first pass to number all links in the email (i.e. append > ?r=n) ### > > [/!][text]linkCount=0[/text][!] > > [/!][text]outputHtml1=[listwords > words=[url][inputHtml][/url]&delimiters=<][!] > > [/!][hideif [url][word][/url]~[url]a href[/url]]<[word][/hideif][!] > [/!][showif [url][word][/url]~[url]a href[/url]][!] > [/!][text]linkCount=[math][linkCount]+1[/math][/text][!] > [/!][grep search=a href="([^"]*)&replace= href="\1?r=[linkcount]][word][/grep][!] > [/!][/showif][!] > > [/!][/listwords][/text][!] > > > ------------------------------------ > ### Step Three: second pass to extract all links to a db ### > > [/!][text]linkCount=0[/text][!] > > [/!][listwords words=[url][outputHtml1][/url]&delimiters=<>][showif > [url][word][/url]~[url]a href[/url]][!] > > [/!][text]linkCount=[math][linkCount]+1[/math][/text][!] > > [/!][append > db=massmailerLinks.db]rid=[cart]_[linkCount]&rCREATEDATE=[math]{[date]}[/math]&rCREATETIME=[time]&rCREATEUSER=&sCAMPAIGNID=[sCAMPAIGNID]&sLINKINDEX=[url][linkCount][/url]&sLINKURL=[url][middle > start=href="&end="][word][/middle][/url]&sCLICKURL=[url] > http://www.example.ie/c/[sCAMPAIGNID]/[linkCount]/[/url][/append][!] > > [/!][/showif][/listwords][!] > > > ------------------------------------ > ### Step Four: create conversion table and amend links ### > > [/!][table name=convertLinks&fields=from,to] > [/table][!] > > [/!][search > db=massmailerLinks.db&&eqsCAMPAIGNIDdatarq=[sCAMPAIGNID]][founditems][!] > [/!][append > table=convertLinks]from=[url]href="[sLINKURL]"[/url]&to=[url]href="[sCLICKURL]"[/url][/append][!] > [/!][/founditems][/search] > >
> [convertwords table=convertLinks][outputHtml1][/convertwords] >
> > > > > > ============================================== > Digital Revolutionaries > 1st Floor, Castleriver House > 14-15 Parliament Street > Temple Bar,Dublin 2 > Ireland > ---------------------------------------------- > [t]: + 353 1 4403907 > [e]: > [w]: > ============================================== > > > On 9 May 2014 08:09, Lawrence Banahan wrote: > >> Your certainly right! >> I spent few hours on it yesterday with no success... >> New day new ideas... >> >> Stuart Tremain >> 9 mai 2014 08:59 >> You may need to spend some time and work through the page, there is no >> magic bullet here, think outside the square and look at how you can >> separate the links, maybe workout how you can isolate the part >> and then middle the link. >> >> You may need to run the page through a number of "filters" to get your >> desired result. >> >> >> Regards >> >> Stuart Tremain >> IDFK Web Developments >> AUSTRALIA >> webdna@idfk.com.au >> >> >> >> >> >> >> --------------------------------------------------------- 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 >> Lawrence Banahan >> 9 mai 2014 08:51 >> I tried that, I also tried [Middle], and some other things, but I can't >> manage to list all the links in a web page... >> >> I wanted to do somthing like that >> http://search.cpan.org/~gaas/HTML-Parser-3.71/lib/HTML/LinkExtor.pm >> but I can't figure if it can be done with Webdna... >> >> Lawrence >> Dan Strong >> 8 mai 2014 18:04 >> Search the source code for "> >> -Dan Strong >> http://DanStrong.com >> >> >> >> --------------------------------------------------------- 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 >> Lawrence Banahan >> 8 mai 2014 17:09 >> Hi, >> I'm working on a new project using Webdna. >> I need to grab the links who are in an html page and store them in a db. >> I went through all the Wdna documentation, but I can't find how to do >> it... >> Any ideas? >> >> Thanks >> Lawrence >> >> --------------------------------------------------------- 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 > --047d7b8736eceda51304f930aece Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Tom
this will give me the direction to go!=
Lawrence


2014-05-09 11:28 GMT+02:00 Tom Duke <= tom@revolutiona= ries.ie>:
Lawrence,

Here's some test code I have been working on to enable link tracking = for HTML emails. =C2=A0 You might be able to pull out parts of it to sort y= our issue.

- Tom




[!]<!-- HAS_WEBDNA_TAGS -->


=
[/!][!]


------------------------------------
### =C2=A0Set the input h= tml variable =C2=A0###

[/!][text]inputHtml=3Dyour_= input_html_goes_here[/text][!]

[/!][text]sCAMPAIGN= ID=3D123456789[/text][!]

[/!][closedatabase db=3DmassmailerLinks.db][!]



------------------------------------
### =C2=A0Step One: delete all existi= ng links related to this email =C2=A0###

[/!][delete db=3DmassmailerLinks.db&eqsCAMPAIGNIDda= tarq=3D[sCAMPAIGNID]][!]


------------------------------------
### =C2=A0Step Two: first= pass to number all links in the email (i.e. append ?r=3Dn) =C2=A0###
=

[/!][text]linkCount=3D0[/text][!]

<= div>[/!][text]outputHtml1=3D[listwords words=3D[url][inputHtml][/url]&d= elimiters=3D<][!]

[/!][hidei= f [url][word][/url]~[url]a href[/url]]<[word][/hideif][!]
[/!][showif [url][word][/url]~[url= ]a href[/url]][!]
[/!][text]linkCount=3D[m= ath][linkCount]+1[/math][/text][!]
[/!][grep search=3Da href=3D"([^"]*)&replace= =3D<a href=3D"\1?r=3D[linkcount]][word][/grep][!]
[/!][/showif][!]

[/!][/listwords][/text][!]


---------------------= ---------------
### =C2=A0Step Three: sec= ond pass to extract all links to a db =C2=A0###

[/= !][text]linkCount=3D0[/text][!]

[/!][listwords wor= ds=3D[url][outputHtml1][/url]&delimiters=3D<>][showif [url][word]= [/url]~[url]a href[/url]][!]

[/!][text]= linkCount=3D[math][linkCount]+1[/math][/text][!]

<= span style=3D"white-space:pre-wrap">[/!][append db=3DmassmailerLink= s.db]rid=3D[cart]_[linkCount]&rCREATEDATE=3D[math]{[date]}[/math]&r= CREATETIME=3D[time]&rCREATEUSER=3D&sCAMPAIGNID=3D[sCAMPAIGNID]&= sLINKINDEX=3D[url][linkCount][/url]&sLINKURL=3D[url][middle start=3Dhre= f=3D"&end=3D"][word][/middle][/url]&sCLICKURL=3D[url]http://www.example.ie/c/[sCAMPAIGNID]/[= linkCount]/[/url][/append][!]

[/!][/showif][/listwords][!]

<= br>
----------------= --------------------
### =C2=A0Step Four: create conversion table and amend links =C2=A0###

[/!][table name=3DconvertLinks&fields=3Dfrom,to]
[/table][!]

[/!][search db=3DmassmailerLin= ks.db&&eqsCAMPAIGNIDdatarq=3D[sCAMPAIGNID]][founditems][!]
[/!][append table=3DconvertL= inks]from=3D[url]href=3D"[sLINKURL]"[/url]&to=3D[url]href=3D&= quot;[sCLICKURL]"[/url][/append][!]
[/!][/founditems][/search]

<div style=3D&q= uot;padding: 20px; border: 3px solid grey;">
[convertword= s table=3DconvertLinks][outputHtml1][/convertwords]
</div><= /div>





=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 Revolutio= naries
1st Floor, Castleriver House
14-15 Parliament Street
Temple Bar,Dublin 2
Ireland
--------------= --------------------------------
[t]: + 353 1 4403907
[e]: = <mailto:tom@= revolutionaries.ie>
[w]: <http:= //www.revolutionaries.ie/>
=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


On 9 May 2014 08:09, Lawrence Banahan <banahan.l@gmail.com> wrote:
Your certainly right!
I spent few hours on it yesterday with no success...
New day new ideas...


=20 9 mai 2014 08:59=
You = may need to spend some time and work through the page, there is no magic bullet here, think=20 outside the square and look at how you can separate the links, maybe=20 workout how you can isolate the <a href=3D""> part and then= middle=20 the link.

You may need to run the page through a=20 number of "filters" to get your desired result.


Regards

Stuart Tremain
IDFK Web Developments
AUSTRALIA





-----------------------------------= ---------------------- 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: suppo= rt@webdna.us

=20 9 mai 2014 08:51=
I tried that, I also tried [Middle], and some other things, but I can't manage to list all the=20 links in a web page...

I wanted to do somthing like that=20 http://search.cpan.org/~gaas/HTML-Parser-3.71/lib/= HTML/LinkExtor.pm
but I can't figure if it can be done with Webdna...

Lawrence

=20 8 mai 2014 18:04=
Search the=20 source code for "<a href"
--------------------------------------------------------- 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: suppo= rt@webdna.us

=20 8 mai 2014 17:09=
Hi,
I'm working on a new project using Webdna.
I need to grab the links who are in an html page and store them in a db.
I went through all the Wdna documentation, but I can't find how to= =20 do it...
Any ideas?

Thanks
Lawrence
--------------------------------------------------------- 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: suppo= rt@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: suppo= rt@webdna.us

--047d7b8736eceda51304f930aece-- --047d7b8736eceda51604f930aecf Content-Type: image/jpeg; x-apple-mail-type=stationery; name="postbox-contact.jpg" Content-Disposition: inline; filename="postbox-contact.jpg" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: e3c4b7b2a0f5dd5c_0.1.2 /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkI CQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQ EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAAZABkDAREA AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3 ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3 uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwClrXxb jiniubu2ttd16+tILuaE2kM1zI7wq7PIzKSoyTgHsMKMACvaqY2jhIcu8uy/U82nQq15cz0X9bGM /wAZfiNo+v6Qlx8OvD91pmsTxW8Xk2EBEZfKDMhCglXXJHB2sOOK86ObVqla0Erdv+Dc7/qcYR9/ 7z6T08WZurcDR9OjYSJmSKzijZTkcqyqCp9CCCK+jlycupwq9ziP+GhPir/0Ol3+Sf8AxNcfsqX8 prd9z4+8IieBbKa6t43lvILUyzqBvkY26blDdlYoWwePlY+gHxyd5M9mKSVz2prfw14w+H8GjX2p 20FzFfSxeTbOqHd8px84YO5XgsAODwU5NOLjzvXUtu8D3n4Ua94e8QTp4PbW4p9f0i2hnuIWb95J bkhUnx3yQAfQ4z1FceZcU4rLZqKjzR2v59vuOzC5Vh8RG8nZ728u549/Z8X90Vj/AK21/wCUn+ya Hc8Y0rwneazYaIsVrLoGoSPbWcltPEc2rYXzFaM/3ApR0OMcqcZNbYrFLB0p1Xrypv8Ar1OejSde UYrS59feG/DHhKHw1a+Dl0eC70yzhCA3KbmZzy8hbrvY7mZgckk1+VVMfivrEsXGbU291+XofYQw 1FUVRcbpGV4B+EXgj4ZfELV/iLpWpajcaheWT27SXtz5i2tuZA5jUnkKNigZPAXHrXZi86xWY0o0 alrJp6dXsc9HL6WGm6kb3enojzD+y/GP/Qoa9/4ATf8AxNe57Gp/I/uPP9pHueZftRf8nceNf+wl /wC0jX1uZfwZfI8TC/Ghth/qvwH9K+Wex7K3Oj8A/wDJRvDv/YXtf/Rwq6Xxx9UKp8LP1fr6o8U/ /9k= --047d7b8736eceda51604f930aecf Content-Type: image/jpeg; x-apple-mail-type=stationery; name="compose-unknown-contact.jpg" Content-Disposition: inline; filename="compose-unknown-contact.jpg" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: e3c4b7b2a0f5dd5c_0.1.1 /9j/4AAQSkZJRgABAQEARwBHAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQECAQEB AQEBAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/2wBDAQEBAQEBAQICAgICAgICAgICAgIC AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/wAARCAAZABkDAREA AhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAABgcICQr/xAA0EAABAwMCAgUKBwAAAAAAAAACAQME BQYRABITIQcUMUF2CBUXIjI2N0JRtVRWkZOV0dL/xAAYAQEAAwEAAAAAAAAAAAAAAAADAAEEAv/E ACQRAAICAAQGAwAAAAAAAAAAAAABAhEDMrHREyExM0FxgfDx/9oADAMBAAIRAxEAPwDuEt+gW/UL et6oVC3rfqNQqFv0OfPn1GhUqfOmzZtKZlS5UqZMaNwzNwiJVIl7eXLCaZIGwBl3TY8epPx2+jy2 ZNPjvkwc9uhW8j7nCPhvOsQliYIeS7cvCpp8o50qwrC4v3lsNSDbdmTEhvs2tahxpfV3WnmbbozJ Ew/gwdadbYExVRXKEKoSdvJcaOSqxE7/AAiX0gXx+a69/JSf9alIlste0VzaNpeFrcT9KKymotyi aZ0KRCnzacoE7Kjzn4gi2KqUh3jqDHDHv4mRUfruTWlMzlVUKIVNp9GguEJnAh0+IZjyAiisgyRD nu5azS8miKqjOTVkKqS/psG37fo1Fbabeg25b8eZPeFJBBJSjMG5HjMeyihnaauZwe4OGiju13GA cpOwBeN+U8/IkGbsiS8b7ryogmbzhbyc9REROfZhERO5ETShjPtvpGqTUyLErytS4siSwx5x2tRH 4hPOI0DkjZtaJtFxuVEbIUUiyeNujlBUJGbJN6nM/Cyf2Hf60YgjvKA+NPSP4gT7axpcPtr51YWJ nYn9dnAQWl722p4ot37yzqnlfp6FrqbwawG8/9k= --047d7b8736eceda51604f930aecf-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] How to Grab link (Lawrence Banahan 2014)
  2. Re: [WebDNA] How to Grab link (Tom Duke 2014)
  3. Re: [WebDNA] How to Grab link (Lawrence Banahan 2014)
  4. Re: [WebDNA] How to Grab link (Stuart Tremain 2014)
  5. Re: [WebDNA] How to Grab link (Lawrence Banahan 2014)
  6. Re: [WebDNA] How to Grab link (Dan Strong 2014)
  7. [WebDNA] How to Grab link (Lawrence Banahan 2014)
--047d7b8736eceda51604f930aecf Content-Type: multipart/alternative; boundary=047d7b8736eceda51304f930aece --047d7b8736eceda51304f930aece Content-Type: text/plain; charset=UTF-8 Thanks Tom this will give me the direction to go! Lawrence 2014-05-09 11:28 GMT+02:00 Tom Duke : > Lawrence, > > Here's some test code I have been working on to enable link tracking for > HTML emails. You might be able to pull out parts of it to sort your issue. > > - Tom > > > > > [!] > > > [/!][!] > > > ------------------------------------ > ### Set the input html variable ### > > [/!][text]inputHtml=your_input_html_goes_here[/text][!] > > [/!][text]sCAMPAIGNID=123456789[/text][!] > > [/!][closedatabase db=massmailerLinks.db][!] > > > > ------------------------------------ > ### Step One: delete all existing links related to this email ### > > [/!][delete db=massmailerLinks.db&eqsCAMPAIGNIDdatarq=[sCAMPAIGNID]][!] > > > ------------------------------------ > ### Step Two: first pass to number all links in the email (i.e. append > ?r=n) ### > > [/!][text]linkCount=0[/text][!] > > [/!][text]outputHtml1=[listwords > words=[url][inputHtml][/url]&delimiters=<][!] > > [/!][hideif [url][word][/url]~[url]a href[/url]]<[word][/hideif][!] > [/!][showif [url][word][/url]~[url]a href[/url]][!] > [/!][text]linkCount=[math][linkCount]+1[/math][/text][!] > [/!][grep search=a href="([^"]*)&replace= href="\1?r=[linkcount]][word][/grep][!] > [/!][/showif][!] > > [/!][/listwords][/text][!] > > > ------------------------------------ > ### Step Three: second pass to extract all links to a db ### > > [/!][text]linkCount=0[/text][!] > > [/!][listwords words=[url][outputHtml1][/url]&delimiters=<>][showif > [url][word][/url]~[url]a href[/url]][!] > > [/!][text]linkCount=[math][linkCount]+1[/math][/text][!] > > [/!][append > db=massmailerLinks.db]rid=[cart]_[linkCount]&rCREATEDATE=[math]{[date]}[/math]&rCREATETIME=[time]&rCREATEUSER=&sCAMPAIGNID=[sCAMPAIGNID]&sLINKINDEX=[url][linkCount][/url]&sLINKURL=[url][middle > start=href="&end="][word][/middle][/url]&sCLICKURL=[url] > http://www.example.ie/c/[sCAMPAIGNID]/[linkCount]/[/url][/append][!] > > [/!][/showif][/listwords][!] > > > ------------------------------------ > ### Step Four: create conversion table and amend links ### > > [/!][table name=convertLinks&fields=from,to] > [/table][!] > > [/!][search > db=massmailerLinks.db&&eqsCAMPAIGNIDdatarq=[sCAMPAIGNID]][founditems][!] > [/!][append > table=convertLinks]from=[url]href="[sLINKURL]"[/url]&to=[url]href="[sCLICKURL]"[/url][/append][!] > [/!][/founditems][/search] > >
> [convertwords table=convertLinks][outputHtml1][/convertwords] >
> > > > > > ============================================== > Digital Revolutionaries > 1st Floor, Castleriver House > 14-15 Parliament Street > Temple Bar,Dublin 2 > Ireland > ---------------------------------------------- > [t]: + 353 1 4403907 > [e]: > [w]: > ============================================== > > > On 9 May 2014 08:09, Lawrence Banahan wrote: > >> Your certainly right! >> I spent few hours on it yesterday with no success... >> New day new ideas... >> >> Stuart Tremain >> 9 mai 2014 08:59 >> You may need to spend some time and work through the page, there is no >> magic bullet here, think outside the square and look at how you can >> separate the links, maybe workout how you can isolate the part >> and then middle the link. >> >> You may need to run the page through a number of "filters" to get your >> desired result. >> >> >> Regards >> >> Stuart Tremain >> IDFK Web Developments >> AUSTRALIA >> webdna@idfk.com.au >> >> >> >> >> >> >> --------------------------------------------------------- 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 >> Lawrence Banahan >> 9 mai 2014 08:51 >> I tried that, I also tried [middle], and some other things, but I can't >> manage to list all the links in a web page... >> >> I wanted to do somthing like that >> http://search.cpan.org/~gaas/HTML-Parser-3.71/lib/HTML/LinkExtor.pm >> but I can't figure if it can be done with Webdna... >> >> Lawrence >> Dan Strong >> 8 mai 2014 18:04 >> Search the source code for "> >> -Dan Strong >> http://DanStrong.com >> >> >> >> --------------------------------------------------------- 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 >> Lawrence Banahan >> 8 mai 2014 17:09 >> Hi, >> I'm working on a new project using Webdna. >> I need to grab the links who are in an html page and store them in a db. >> I went through all the Wdna documentation, but I can't find how to do >> it... >> Any ideas? >> >> Thanks >> Lawrence >> >> --------------------------------------------------------- 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 > --047d7b8736eceda51304f930aece Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Tom
this will give me the direction to go!=
Lawrence


2014-05-09 11:28 GMT+02:00 Tom Duke <= tom@revolutiona= ries.ie>:
Lawrence,

Here's some test code I have been working on to enable link tracking = for HTML emails. =C2=A0 You might be able to pull out parts of it to sort y= our issue.

- Tom




[!]<!-- HAS_WEBDNA_TAGS -->


=
[/!][!]


------------------------------------
### =C2=A0Set the input h= tml variable =C2=A0###

[/!][text]inputHtml=3Dyour_= input_html_goes_here[/text][!]

[/!][text]sCAMPAIGN= ID=3D123456789[/text][!]

[/!][closedatabase db=3DmassmailerLinks.db][!]



------------------------------------
### =C2=A0Step One: delete all existi= ng links related to this email =C2=A0###

[/!][delete db=3DmassmailerLinks.db&eqsCAMPAIGNIDda= tarq=3D[sCAMPAIGNID]][!]


------------------------------------
### =C2=A0Step Two: first= pass to number all links in the email (i.e. append ?r=3Dn) =C2=A0###
=

[/!][text]linkCount=3D0[/text][!]

<= div>[/!][text]outputHtml1=3D[listwords words=3D[url][inputHtml][/url]&d= elimiters=3D<][!]

[/!][hidei= f [url][word][/url]~[url]a href[/url]]<[word][/hideif][!]
[/!][showif [url][word][/url]~[url= ]a href[/url]][!]
[/!][text]linkCount=3D[m= ath][linkCount]+1[/math][/text][!]
[/!][grep search=3Da href=3D"([^"]*)&replace= =3D<a href=3D"\1?r=3D[linkcount]][word][/grep][!]
[/!][/showif][!]

[/!][/listwords][/text][!]


---------------------= ---------------
### =C2=A0Step Three: sec= ond pass to extract all links to a db =C2=A0###

[/= !][text]linkCount=3D0[/text][!]

[/!][listwords wor= ds=3D[url][outputHtml1][/url]&delimiters=3D<>][showif [url][word]= [/url]~[url]a href[/url]][!]

[/!][text]= linkCount=3D[math][linkCount]+1[/math][/text][!]

<= span style=3D"white-space:pre-wrap">[/!][append db=3DmassmailerLink= s.db]rid=3D[cart]_[linkCount]&rCREATEDATE=3D[math]{[date]}[/math]&r= CREATETIME=3D[time]&rCREATEUSER=3D&sCAMPAIGNID=3D[sCAMPAIGNID]&= sLINKINDEX=3D[url][linkCount][/url]&sLINKURL=3D[url][middle start=3Dhre= f=3D"&end=3D"][word][/middle][/url]&sCLICKURL=3D[url]http://www.example.ie/c/[sCAMPAIGNID]/[= linkCount]/[/url][/append][!]

[/!][/showif][/listwords][!]

<= br>
----------------= --------------------
### =C2=A0Step Four: create conversion table and amend links =C2=A0###

[/!][table name=3DconvertLinks&fields=3Dfrom,to]
[/table][!]

[/!][search db=3DmassmailerLin= ks.db&&eqsCAMPAIGNIDdatarq=3D[sCAMPAIGNID]][founditems][!]
[/!][append table=3DconvertL= inks]from=3D[url]href=3D"[sLINKURL]"[/url]&to=3D[url]href=3D&= quot;[sCLICKURL]"[/url][/append][!]
[/!][/founditems][/search]

<div style=3D&q= uot;padding: 20px; border: 3px solid grey;">
[convertword= s table=3DconvertLinks][outputHtml1][/convertwords]
</div><= /div>





=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 Revolutio= naries
1st Floor, Castleriver House
14-15 Parliament Street
Temple Bar,Dublin 2
Ireland
--------------= --------------------------------
[t]: + 353 1 4403907
[e]: = <mailto:tom@= revolutionaries.ie>
[w]: <http:= //www.revolutionaries.ie/>
=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


On 9 May 2014 08:09, Lawrence Banahan <banahan.l@gmail.com> wrote:
Your certainly right!
I spent few hours on it yesterday with no success...
New day new ideas...


=20 9 mai 2014 08:59=
You = may need to spend some time and work through the page, there is no magic bullet here, think=20 outside the square and look at how you can separate the links, maybe=20 workout how you can isolate the <a href=3D""> part and then= middle=20 the link.

You may need to run the page through a=20 number of "filters" to get your desired result.


Regards

Stuart Tremain
IDFK Web Developments
AUSTRALIA





-----------------------------------= ---------------------- 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: suppo= rt@webdna.us

=20 9 mai 2014 08:51=
I tried that, I also tried [middle], and some other things, but I can't manage to list all the=20 links in a web page...

I wanted to do somthing like that=20 http://search.cpan.org/~gaas/HTML-Parser-3.71/lib/= HTML/LinkExtor.pm
but I can't figure if it can be done with Webdna...

Lawrence

=20 8 mai 2014 18:04=
Search the=20 source code for "<a href"
--------------------------------------------------------- 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: suppo= rt@webdna.us

=20 8 mai 2014 17:09=
Hi,
I'm working on a new project using Webdna.
I need to grab the links who are in an html page and store them in a db.
I went through all the Wdna documentation, but I can't find how to= =20 do it...
Any ideas?

Thanks
Lawrence
--------------------------------------------------------- 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: suppo= rt@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: suppo= rt@webdna.us

--047d7b8736eceda51304f930aece-- --047d7b8736eceda51604f930aecf Content-Type: image/jpeg; x-apple-mail-type=stationery; name="postbox-contact.jpg" Content-Disposition: inline; filename="postbox-contact.jpg" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: e3c4b7b2a0f5dd5c_0.1.2 /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkI CQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQ EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAAZABkDAREA AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3 ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3 uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwClrXxb jiniubu2ttd16+tILuaE2kM1zI7wq7PIzKSoyTgHsMKMACvaqY2jhIcu8uy/U82nQq15cz0X9bGM /wAZfiNo+v6Qlx8OvD91pmsTxW8Xk2EBEZfKDMhCglXXJHB2sOOK86ObVqla0Erdv+Dc7/qcYR9/ 7z6T08WZurcDR9OjYSJmSKzijZTkcqyqCp9CCCK+jlycupwq9ziP+GhPir/0Ol3+Sf8AxNcfsqX8 prd9z4+8IieBbKa6t43lvILUyzqBvkY26blDdlYoWwePlY+gHxyd5M9mKSVz2prfw14w+H8GjX2p 20FzFfSxeTbOqHd8px84YO5XgsAODwU5NOLjzvXUtu8D3n4Ua94e8QTp4PbW4p9f0i2hnuIWb95J bkhUnx3yQAfQ4z1FceZcU4rLZqKjzR2v59vuOzC5Vh8RG8nZ728u549/Z8X90Vj/AK21/wCUn+ya Hc8Y0rwneazYaIsVrLoGoSPbWcltPEc2rYXzFaM/3ApR0OMcqcZNbYrFLB0p1Xrypv8Ar1OejSde UYrS59feG/DHhKHw1a+Dl0eC70yzhCA3KbmZzy8hbrvY7mZgckk1+VVMfivrEsXGbU291+XofYQw 1FUVRcbpGV4B+EXgj4ZfELV/iLpWpajcaheWT27SXtz5i2tuZA5jUnkKNigZPAXHrXZi86xWY0o0 alrJp6dXsc9HL6WGm6kb3enojzD+y/GP/Qoa9/4ATf8AxNe57Gp/I/uPP9pHueZftRf8nceNf+wl /wC0jX1uZfwZfI8TC/Ghth/qvwH9K+Wex7K3Oj8A/wDJRvDv/YXtf/Rwq6Xxx9UKp8LP1fr6o8U/ /9k= --047d7b8736eceda51604f930aecf Content-Type: image/jpeg; x-apple-mail-type=stationery; name="compose-unknown-contact.jpg" Content-Disposition: inline; filename="compose-unknown-contact.jpg" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: e3c4b7b2a0f5dd5c_0.1.1 /9j/4AAQSkZJRgABAQEARwBHAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQECAQEB AQEBAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/2wBDAQEBAQEBAQICAgICAgICAgICAgIC AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/wAARCAAZABkDAREA AhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAABgcICQr/xAA0EAABAwMCAgUKBwAAAAAAAAACAQME BQYRABITIQcUMUF2CBUXIjI2N0JRtVRWkZOV0dL/xAAYAQEAAwEAAAAAAAAAAAAAAAADAAEEAv/E ACQRAAICAAQGAwAAAAAAAAAAAAABAhEDMrHREyExM0FxgfDx/9oADAMBAAIRAxEAPwDuEt+gW/UL et6oVC3rfqNQqFv0OfPn1GhUqfOmzZtKZlS5UqZMaNwzNwiJVIl7eXLCaZIGwBl3TY8epPx2+jy2 ZNPjvkwc9uhW8j7nCPhvOsQliYIeS7cvCpp8o50qwrC4v3lsNSDbdmTEhvs2tahxpfV3WnmbbozJ Ew/gwdadbYExVRXKEKoSdvJcaOSqxE7/AAiX0gXx+a69/JSf9alIlste0VzaNpeFrcT9KKymotyi aZ0KRCnzacoE7Kjzn4gi2KqUh3jqDHDHv4mRUfruTWlMzlVUKIVNp9GguEJnAh0+IZjyAiisgyRD nu5azS8miKqjOTVkKqS/psG37fo1Fbabeg25b8eZPeFJBBJSjMG5HjMeyihnaauZwe4OGiju13GA cpOwBeN+U8/IkGbsiS8b7ryogmbzhbyc9REROfZhERO5ETShjPtvpGqTUyLErytS4siSwx5x2tRH 4hPOI0DkjZtaJtFxuVEbIUUiyeNujlBUJGbJN6nM/Cyf2Hf60YgjvKA+NPSP4gT7axpcPtr51YWJ nYn9dnAQWl722p4ot37yzqnlfp6FrqbwawG8/9k= --047d7b8736eceda51604f930aecf-- Lawrence Banahan

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:

Is this possible, WebCat2.0 and checkboxes (1997) date display (1999) pc (1997) Re:Gil's in the lead (1999) [DOS]/DOS query - A SOLUTION (2003) emailer w/F2 (1997) Help formatting search results w/ table (1997) Problems appending to database (1997) Error Lob.db records error message not name (1997) [WebDNA] [hideif]'s not working in [sendmail] (2008) Dumb Question about Docs (1997) Navigator 4.01 (1997) controlling user input (1998) Date search - yes or no (1997) weird convertchars behavior (2000) Summing fields (1997) NT considerations (1997) ShowIf Question (1998) Permission Denied Error (2001) Bug Report, maybe (1997)