Jump to content
faustf

regexep not load

Recommended Posts

hi guy

i  do a script   for take  a freelist proxy  bye  this site   http://freeproxylists.net/

 

i  build  this  script  but not  work

someone  can help  me  ??   where i did do a mistake? :D  thnakz  alot

 

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.12.0
 Author:         myName

 Script Function:
    ESTRATTORE PROXY
        by Faustf
#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
#include <IE.au3>
#include <MsgBoxConstants.au3>
#include <StringConstants.au3>
#include <InetConstants.au3>
#include <WinAPI.au3>
#include <WinAPIsysinfoConstants.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
#include <Misc.au3>
#include <INet.au3>
#include <Excel.au3>
#include <File.au3>
#include <Array.au3>

; VARIABILI GLOBALI

Global $percorso_stati_txt = "E:\_ESTRATTORE PROXY\Proxy_list.txt"
Global $oIE,$pagine = 2

If ProcessExists("iexplore.exe") Then ; Check if the internet esplorer process is running.
    ProcessClose("iexplore.exe")
EndIf

_FileBorn($percorso_stati_txt) ;creo file degli stati temporaneo
_entra_dentro() ;  entra dentro il sito web e  arriva fino a fantaricerca e primo livello gruppi ,es. audio borse cd dvd  elttrodomestici




Func _1_step()
Do
    Local $proxy_html = _IEBodyReadHTML($oIE)
    Local $lista = StringRegExpReplace ($proxy_html,'(?s)script><a href="http://www.freeproxylists.net/.+?.html" abp=".+?">(.*?)</a></td><td align="center" abp=".+?">(.*?)</td>', $STR_REGEXPARRAYGLOBALMATCH)
    _ArrayDisplay($lista)

For $i = 0 To UBound($lista) - 1
    _popola_txt($percorso_stati_txt, $lista[$i])
Next
_IENavigate ($oIE,"http://freeproxylists.net/?page="&$pagine)
_IELoadWait($oIE)

$pagine +=1
Until   $pagine = 21
    EndFunc

; #FUNCTION# ====================================================================================================================
; Author ........: faustf
; Modified.......:
; What do........: popola txt  creato
; ===============================================================================================================================
Func _popola_txt($sFilePath, $sFlieTxt)

    $file = FileOpen($sFilePath, 1)
    FileWrite($file, $sFlieTxt & @CR)
    FileClose($file)

EndFunc   ;==>_popola_txt

;#FUNCTION# ====================================================================================================================
; Author ........: faustf
; Modified.......:
; What do........: controlla se il file esiste nella cartella se si lo cancella e ne crea uno nuovo vuoto, se no non fa nulla
; ===============================================================================================================================

Func _FileBorn($sFilePath)

    Local $iFileExists = FileExists($sFilePath)
    If $iFileExists Then
        FileDelete($sFilePath)
        _FileCreate($sFilePath)
    Else
        _FileCreate($sFilePath)
    EndIf
EndFunc   ;==>_FileBorn


; #FUNCTION# ====================================================================================================================
; Author ........: faustf
; Modified.......:
; What do........: entro dentro il sito
; ===============================================================================================================================

Func _entra_dentro()

    $oIE = _IECreate("http://freeproxylists.net/", 0, 1, 1, 1)
    _IELoadWait($oIE)

    _1_step()
EndFunc   ;==>_entra_dentro

 

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

the code I show it read data from html file. you can use _IEBodyReadHTML. So Page seems to have captcha verification some times.

 

Saludos

Share this post


Link to post
Share on other sites

i use  this 

Func _1_step()
Do
    Local $proxy_html = _IEBodyReadHTML($oIE)
    Local $oTable = _IETableGetCollection($oIE, 1)
    Local $aTableData = _IETableWriteToArray($oTable)

Local $lista = StringRegExp(FileRead("Data.html"),'\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b', 3)
_ArrayDisplay($lista)
;_ArrayDisplay($aTableData)
;   _ArrayDisplay($lista)

For $i = 0 To UBound($lista) - 1
    _popola_txt($percorso_stati_txt, $lista[$i])
Next
_IENavigate ($oIE,"http://freeproxylists.net/?page="&$pagine)
_IELoadWait($oIE)

$pagine +=1
Until   $pagine = 21
    EndFunc

but not  go

 

Share this post


Link to post
Share on other sites

try this. should work if page does not show the captcha verification to enter.

#include <Array.au3>
#include <IE.au3>

Local $oIE = _IECreate("http://freeproxylists.net/")
_IELoadWait($oIE)



ConsoleWrite(_IEBodyReadHTML($oIE))
Local $lista = StringRegExp(_IEBodyReadHTML($oIE),'\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b', 3)
_ArrayDisplay($lista)


_IEQuit($oIE)

Saludos

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

×
×
  • Create New...