Help to find url

93 views
Skip to first unread message

Enrico Morelli

unread,
Oct 29, 2014, 6:08:29 AM10/29/14
to mecha...@googlegroups.com
Dear,

I'm trying to use mechanize to search some links in an html page, but I don't understand how to do. The following is a link example. I've to search  the href to allow me to download the file.

<a class="jsDownload"
   data-jsonurl="/apps/TRGCHlZRQVNYVrXF?issue=201411&amp;output=json&amp;pub=km&amp;fileformat=RTF&amp;alllangs=0&amp;langwritten=I&amp;txtCMSLang=I"
   data-issuedate="NOVEMBRE 2014"
   data-cover=""
   href="/apps/TRGCHlZRQVNYVrXF?issue=201411&amp;output=html&amp;pub=km&amp;fileformat=RTF&amp;alllangs=0&amp;langwritten=I&amp;txtCMSLang=I"
   title="Download">
   <span class="lang-en dir-ltr">RTF</span>
</a>

I tryed with

HtmlElement htmlElement = ((HtmlDocument)page).htmlElements().find("*[href$='/apps/TRGCHlZRQVNYVrXF?issue=201411&amp;output=html&amp;pub=km&amp;fileformat=RTF&amp;alllangs=0&amp;langwritten=I&amp;txtCMSLang=I']");

but the result is null. Can you help me?

Thanks

PS: there is documentation where I can find example apart for the tests?
Reply all
Reply to author
Forward
0 new messages