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
Using found in source string as link
-
- Site Admin
- Posts: 2084
- Joined: 02 Mar 2009, 17:02
Re: Using found in source string as link
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]
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.
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]
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.