Page 1 of 1

Using found in source string as link

Posted: 31 Jul 2017, 18:59
by szprot5
Hello,

I want my project to find "hidden" links in classes <a> etc. etc. the links are just nice looking full urls that sadly are missed when i run my project.
How can i make that thing work?

Example. i want to check whole html source for *messages/t/* fragment and if it finds that - copy whole url and use it to go deeper.

Best Regards
Jacek

Re: Using found in source string as link

Posted: 01 Aug 2017, 11:09
by Maksym
Hello Jacek,

This is what "Custom Parsers" are there for. They are used to create URLs from page text. If your links are inside attributes of any tag, like this:

<a href="#" some-attribute="http://full-url">some text or image here</a>

then you should create the following Custom Parser:

Expression: some-attrbitute="([^"]+)"
Result: [#1]

Image

This Expression means: take all text that starts after

some-attrbitute="

contains 1 or more symbol that is not "

[^"]+

and finishes before the first occurrence of "

In this case the result will be:

http://full-url

If you give me a piece of real page text - I'll create exact parser that will do the job for you.