Jump to content
Sign in to follow this  
yton

$href = _FFXpath

Recommended Posts

yton

Greetings,

href = _FFXpath("//a[@href='www.site.com/1*']", "text")

is there any way to use mask in this expression?

* or smth else - i just cannot get information on this topic

i need to get all links from the page of the following type:

www.site.com/12

www.site.com/17

www.site.com/19

please, help!

Share this post


Link to post
Share on other sites
yton

not all, but those that have the structure site.com/1*

www.site.com/12

www.site.com/17

www.site.com/19

Share this post


Link to post
Share on other sites
Zibit

k i dont know if this will work but how about this:

$source = _INetGetSource("http://www.test.com/12")
filewriteline("source.txt", $source)
$i = 0
$count = _filecountline("source.txt")
do
$i = $i + 1
$read = filereadline("source.txt", $i)
$split = stringsplit($read, " ", 1)
if $split[0] <> 0 then
$n = 0
do 
if $split[$n] = "href" then _func($split[$n]) ;added this cause i dont know what you want to do with the href.
until $split[$n] = $split[0]
endif
until $i = $count

i think it should work, i just scratched it up on fast reply :mellow:

Edited by Zibit

Share this post


Link to post
Share on other sites
Zibit

k now i get it...

you want it like this:

* www.site.com/randomtext

* www.site.com/anotherrandom

about it: you cant get all the links on that site without a basis... i mean if the source doesnt contain a link like www.site.com/12 you cant get the link. it has to be written somewhere

Share this post


Link to post
Share on other sites
yton

i need links that have a similar part: site.com/1

www.site.com/12

www.site.com/17

www.site.com/19

each of above mentioned links has 1 (one) as a first digit after the slash

i need the mask for an expression that will help me gather all such links

Share this post


Link to post
Share on other sites
yton

well, i get the idea, but i need the list of urls, not the whole page code :mellow:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×