Jump to content

Recommended Posts

Posted (edited)

I mean here to downloaded the src of the image and paste it to $ hrefs

Here is the code from image to download scr.

<div id="images" style="width: 300px; height: 57px; "><img style="display:block;" height="57" width="300" src="http://www.nk.pl/images/new"></div>

$hrefs = ... ;where (...) is the image src
Edited by metis
Posted

I mean here to downloaded the src of the image and paste it to $ hrefs

Hello,

Here just an example:

$sText = '<div id="images" style="width: 300px; height: 57px; "><img style="display:block;" height="57" width="300" src="http://www.nk.pl/images/new"></div>'
$array = StringRegExp($sText,'(?i)src="(.*)"',1)
If @error Then
    ConsoleWrite("No matches found" & @CRLF)
Else
    $href = $array[0]
    ConsoleWrite("I've found this: " & $href & @CRLF)
EndIf

Above example will match only once, i.e. if there are more patterns (src="*") it will only match the first one... take a look to StringRegExp.

One more thing, if you need to get the source from the web page then take a peek to _INetGetSource.

Posted

UP @

The problem is that as operating on Firefox (_FF)

UP2 @ Thanks. How do I set it to read it just a picture.

xpath img =

/html/body/div[3]/div/div/div/div/a/img
Posted

UP2 @ Thanks. How do I set it to read it just a picture.

xpath img =

/html/body/div[3]/div/div/div/div/a/img

Sorry but I don't understand what do you need.
Posted (edited)

Me all code

#include <ff.au3>
#include <string.au3>
_FFConnect()
_FFStart("www.nk.pl")

$sText = _FFReadHtml()
;There needs to look for from the moment that is /html/body/div[3]/div/div/div/div/a
$array = StringRegExp($sText,'(?i)src="(.*)"',1)
If @error Then
    ConsoleWrite("No matches found" & @CRLF)
Else
    $href = $array[0]
    ConsoleWrite("I've found this: " & $href & @CRLF)
EndIf
;It is the task I see logos servisu scr
Edited by metis
Posted

Never mind. I need to begin looking for the given object

/ / html / body / div [3] / div / div / div / div / a

know how to do it?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...