Jump to content

gonna rip a website


Recommended Posts

#include <array.au3>
#include <IE.au3>
#include <Inet.au3>
 dim $ga[100]
; Create a browser window and navigate to hotmail
$oIE = _IECreate ("http://www.realitylapse.com",0,0)
 
; Get pointers to the login form and username, password, and signin fields

$o_form = _IEFormGetObjByName ($oIE, "speedForm")
$o_login = _IEFormElementGetObjByName ($o_form, "username")
$o_password = _IEFormElementGetObjByName ($o_form, "password")
$o_signin = _IEFormElementGetObjByName ($o_form, "Submit")
 
$username = "myuser"
$password = "mypass"
 
; Set field values and submit the form
_IEFormElementSetValue ($o_login, $username)
_IEFormElementSetValue ($o_password, $password)
_IEAction ($o_signin, "click")
 
for $i=1 to 23
    if $i <10 then $i = "0" & $i


$ga=StringRegExp(_INetGetSource("http://realitylapse.com/downloads/videos/cowboybebop/cowboybebop" & $i & ".rmvb"), '</strong><li><a href="(.*?)?i>Download from', 0))
msgbox (0,"asd",$ga[1])
    next

i need go get link. but i couldn't achieve to get it with regexp.

Link to comment
Share on other sites

Hi,

RegExp:

Show us before and after.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

/div>Your file can now be downloaded from the <a href="http://zeta.realitylapse.com/speedpass/bfe71a9bc46c526814cd95ee6fd86a53/46405335/fulleps/cowboybebop/cowboybebop01.rmvb">Zeta server</a></a>. 
        If your file starts streaming or downloading to a temporary directory, right click the previous link and click save as.
i need to capture link which starts with zeta.

Link to comment
Share on other sites

Hi,

Global $str = '/div>Your file can now be downloaded from the <a href="http://zeta.realitylapse.com/speedpass/bfe71a9bc46c526814cd95ee6fd86a53/46405335/fulleps/cowboybebop/cowboybebop01.rmvb">Zeta server</a></a>.' & _
        'If your file starts streaming or downloading to a temporary directory, right click the previous link and click save as.'
$link = StringRegExp($str, '(?<=href=").*(?=")', 1)
MsgBox(64, 'Link', $link[0])

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

works faulty when checking full page. I think we must be more spesific.

Here's the full page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
    <title>Downloading cowboybebop01.rmvb - realityLAPSE[.com]__</title>
    <meta content="">
    <style></style>
    <link href="/layout/style.css" rel="stylesheet" type="text/css" />
    <link href="/stylesheets/downloads.css" rel="stylesheet" type="text/css" />

    <!-- ValueClick Media POP-UNDER CODE v1.8 for realitylapse.com (4 hour) -->

    <script language="javascript"><!--                               
    var dc=document; var date_ob=new Date();
    dc.cookie='h2=o; path=/;';var bust=date_ob.getSeconds();
    if(dc.cookie.indexOf('e=llo') <= 0 && dc.cookie.indexOf('2=o') > 0){
    dc.write('<scr'+'ipt language="javascript" src="http://media.fastclick.net');
    dc.write('/w/pop.cgi?sid=25165&m=2&tp=2&v=1.8&c='+bust+'"></scr'+'ipt>');
    date_ob.setTime(date_ob.getTime()+14400000);
    dc.cookie='he=llo; path=/; expires='+ date_ob.toGMTString();} // -->
    </script>                                                         
    <!-- ValueClick Media POP-UNDER CODE v1.8 for realitylapse.com -->

    <link rel="shortcut icon" href="/favicon.ico">
    
</head>
<body>
<div id="container">
    <div id="header"><img src="/layout/images/header.jpg" /></div>
    <div id="menu">
        <ul>

            
            <li><a href="/index.php">Home</a></li>
            <li><a href="http://l-factor.net">Forums</a></li> 
            <li><a href="http://l-factor.net/webchat">Chat Room</a></li>
            <li><a href="http://l-factor.net/member.php?u=2">Contact</a></li> 
            <li><a href="/pages/selectmp3.php">Mp3s</a></li>
            <li><a href="/pages/selectmanga.php">Manga</a></li>
            <li><a href="/pages/selectvideos.php">Full Episodes</a></li>

            <li><a href="/pages/selectmovies.php">Movies</a></li>
            <li><a href="/pages/selectwallpaper.php">Wallpapers</a></li>
            <li><a href="/pages/selecttutorial.php">Tutorials</a></li>
            <li><a href="/pages/coming-soon.php">Coming Soon</a></li>
            <li> </li>
        </ul>

    </div>
    <div id="leaderboard">
        <!-- TF 728x90 JScript VAR code -->
        <script language=javascript><!--
        document.write('<scr'+'ipt language=javascript src="http://a.tribalfusion.com/j.ad?site=RealityLapsecom&adSpace=ROS&size=728x90&type=var&requestID='+((new Date()).getTime() % 2147483648) + Math.random()+'"></scr'+'ipt>');
        //-->
        </script>
        <noscript>
        <a href="http://a.tribalfusion.com/i.click?site=RealityLapsecom&adSpace=ROS&size=728x90&requestID=874239216" target=_blank>
        <img src="http://a.tribalfusion.com/i.ad?site=RealityLapsecom&adSpace=ROS&size=728x90&requestID=874239216" 
                width=728 height=90 border=0 alt="Click Here"></a>
        </noscript>
        <!-- TF 728x90 JScript VAR code -->
    </div>
    <div id="leftnav">

    <div class="menucategory">Anime Listing</div>
    <ul>
        <li><a href="/pages/animelist.php">All Anime</a></li>
        <li><a href="/info/12kingdoms/splash.php">12 Kingdoms</a></li><li><a href="/info/3x3-eyes/splash.php">3x3 Eyes</a></li><li><a href="/info/air-tv/splash.php">Air TV</a></li><li><a href="/info/ai-yori-aoshi/splash.php">Ai Yori Aoshi</a></li><li><a href="/info/ayashinoceres/splash.php">Ayashi no Ceres</a></li><li><a href="/info/basilisk/splash.php">Basilisk</a></li><li><a href="/info/beserk/splash.php">Berserk</a></li><li><a href="/info/black-blood-brothers/splash.php">Black Blood Brothers</a></li><li><a href="/info/black-cat/splash.php">Black Cat</a></li><li><a href="/info/black-lagoon/splash.php">Black Lagoon</a></li><li><a href="/info/bleach/splash.php">Bleach</a></li><li><a href="/info/blood+/splash.php">Blood+</a></li><li><a href="/info/bluegender/splash.php">Blue Gender</a></li><li><a href="/info/busou-renkin/splash.php">Busou Renkin</a></li><li><a href="/info/chobits/splash.php">Chobits</a></li><li><a href="/info/code-geass/splash.php">Code Geass</a></li><li><a href="/info/cowboybebop/splash.php">Cowboy Bebop</a></li><li><a href="/info/darker-than-black/splash.php">Darker than BLACK</a></li><li><a href="/info/d-c-da-capo/splash.php">D.C. Da Capo</a></li><li><a href="/info/dears/splash.php">DearS</a></li><li><a href="/info/death-note/splash.php">Death Note</a></li><li><a href="/info/d-gray-man/splash.php">D.Gray-man</a></li><li><a href="/info/ergo-proxy/splash.php">Ergo Proxy</a></li><li><a href="/info/eureka-seven/splash.php">Eureka Seven</a></li><li><a href="/info/eyeshield-21/splash.php">Eyeshield 21</a></li><li><a href="/info/fate-stay-night/splash.php">Fate/stay night</a></li><li><a href="/info/flameofrecca/splash.php">Flame of Recca</a></li><li><a href="/info/fruitbasket/splash.php">Fruit Basket</a></li><li><a href="/info/fullalchem/splash.php">Full Metal Alchemist</a></li><li><a href="/info/flcl/splash.php">Furi Kuri / FLCL</a></li><li><a href="/info/ghostshell/splash.php">Ghost in the Shell</a></li><li><a href="/info/great-teacher-onizuka/splash.php">Great Teacher Onizuka</a></li><li><a href="/info/gundamseed/splash.php">Gundam Seed</a></li><li><a href="/info/gundamseeddestiny/splash.php">Gundam Seed Destiny</a></li><li><a href="/info/gundamwing/splash.php">Gundam Wing</a></li><li><a href="/info/gungrave/splash.php">GunGrave</a></li><li><a href="/info/gunxsword/splash.php">GUNxSWORD</a></li><li><a href="/info/hack-roots/splash.php">.hack//Roots</a></li><li><a href="/info/hacksign/splash.php">.hack//SIGN</a></li><li><a href="/info/hellsing/splash.php">Hellsing</a></li><li><a href="/info/hunterxhunter/splash.php">Hunter X Hunter</a></li><li><a href="/info/initiald/splash.php">Initial D</a></li><li><a href="/info/inuyasha/splash.php">Inuyasha</a></li><li><a href="/info/kanon/splash.php">Kanon</a></li><li><a href="/info/kekkaishi/splash.php">Kekkaishi</a></li><li><a href="/info/kiba/splash.php">Kiba</a></li><li><a href="/info/lastexile/splash.php">Last Exile</a></li><li><a href="/info/lovehina/splash.php">Love Hina</a></li><li><a href="/info/maihime/splash.php">Mai Hime</a></li><li><a href="/info/mushishi/splash.php">Mushishi</a></li><li><a href="/info/nana/splash.php">NANA</a></li><li><a href="/info/naruto/splash.php">Naruto</a></li><li><a href="/info/naruto-movie/splash.php">Naruto Movie</a></li><li><a href="/info/naruto-shippuuden/splash.php">Naruto: Shippuuden</a></li><li><a href="/info/oteacher/splash.php">Onegai Teacher</a></li><li><a href="/info/onegai-twins/splash.php">Onegai Twins</a></li><li><a href="/info/one-piece/splash.php">One Piece</a></li><li><a href="/info/outlawstar/splash.php">Outlaw Star</a></li><li><a href="/info/paranoiaagent/splash.php">Paranoia Agent</a></li><li><a href="/info/pita-ten/splash.php">Pita Ten</a></li><li><a href="/info/princeoftennis/splash.php">Prince of Tennis</a></li><li><a href="/info/readordie/splash.php">Read or Die</a></li><li><a href="/info/kenshin/splash.php">Rurouni Kenshin</a></li><li><a href="/info/samurai7/splash.php">Samurai 7</a></li><li><a href="/info/samuraichamploo/splash.php">Samurai Champloo</a></li><li><a href="/info/samurai-deeper-kyo/splash.php">Samurai Deeper Kyo</a></li><li><a href="/info/school-rumble/splash.php">School Rumble</a></li><li><a href="/info/scryed/splash.php">Scryed</a></li><li><a href="/info/selain/splash.php">Serial Experiments Lain</a></li><li><a href="/info/shakugan-no-shana/splash.php">Shakugan no Shana</a></li><li><a href="/info/shamanking/splash.php">Shaman King</a></li><li><a href="/info/tenjoutenge/splash.php">Tenjou Tenge</a></li><li><a href="/info/tokyo-majin-gakuen-kenpucho-to/splash.php">Tokyo Majin Gakuen Kenpucho To</a></li><li><a href="/info/trigun/splash.php">Trigun</a></li><li><a href="/info/trinity-blood/splash.php">Trinity Blood</a></li><li><a href="/info/tsubasa-chronicle/splash.php">Tsubasa Chronicle</a></li><li><a href="/info/vandread/splash.php">Vandread</a></li><li><a href="/info/escaflowne/splash.php">Vision of Escaflowne</a></li><li><a href="/info/welcome-to-the-nhk/splash.php">Welcome to the NHK</a></li><li><a href="/info/whr/splash.php">Witch Hunter Robin</a></li><li><a href="/info/wolfsrain/splash.php">Wolf's Rain</a></li><li><a href="/info/xenosaga/splash.php">Xenosaga the Animation</a></li><li><a href="/info/hakusho/splash.php">Yu Yu Hakusho</a></li>

    </ul>
    </div>
    <div id="content"><h1><h1>Downloading cowboybebop01.rmvb</h1></h1><div style="padding: 5px"><span style="font-weight: bold">Your file is now downloading</span><div class="box"><div style="height: 250px"><div style="float: right"><!-- TF 300x250 JScript VAR code -->
                <center><script language=javascript><!--
                document.write('<scr'+'ipt language=javascript src="http://a.tribalfusion.com/j.ad?site=RealityLapsecom&adSpace=ROS&size=300x250&type=var&requestID='+((new Date()).getTime() % 2147483648) + Math.random()+'"></scr'+'ipt>');
                //-->
                </script>
                <noscript>
                <a href="http://a.tribalfusion.com/i.click?site=RealityLapsecom&adSpace=ROS&size=300x250&requestID=137485475" target=_blank>
                <img src="http://a.tribalfusion.com/i.ad?site=RealityLapsecom&adSpace=ROS&size=300x250&requestID=137485475" 
                        width=300 height=250 border=0 alt="Click Here"></a>
                </noscript>
                </center>
                <!-- TF 300x250 JScript VAR code --></div>Your file can now be downloaded from the <a href="http://zeta.realitylapse.com/speedpass/796128c0825c3b97767f8eae6131c3a2/46406048/fulleps/cowboybebop/cowboybebop01.rmvb">Zeta server</a></a>. 
        If your file starts streaming or downloading to a temporary directory, right click the previous link and click save as.
        You can also download your file from the servers below.<ul><strong>Download your file from: </strong><li><a href="http://zeta.realitylapse.com/speedpass/796128c0825c3b97767f8eae6131c3a2/46406048/fulleps/cowboybebop/cowboybebop01.rmvb">Download from the Zeta server</a> <br />Location:Dallas, TX [U.S.A]</li><li><a href="http://iota.realitylapse.com/speedpass/796128c0825c3b97767f8eae6131c3a2/46406048/fulleps/cowboybebop/cowboybebop01.rmvb">Download from the Iota server</a> <br />Location:Atlanta, GA [U.S.A]</li><li><a href="http://mu.realitylapse.com/speedpass/796128c0825c3b97767f8eae6131c3a2/46406048/fulleps/cowboybebop/cowboybebop01.rmvb">Download from the Mu server</a> <br />Location: Atlanta, GA</li></ul></div></div></div></div>

    <div id="rightnav">
        <div class="menucategory">SpeedPass</div>
        <strong>sk8er_boi</strong><br /><a href="http://realitylapse.com/speedpass/myaccount.php">Account Options</a><br /><a href="http://realitylapse.com/speedpass/renew.php">Renew</a><br /><a href="http://realitylapse.com/speedpass/logout.php">Log Out</a><br />    
        <div class="menucategory">Sponsors</div>
        <div align="center">
            <!-- TF 160x600 JScript VAR code -->

            <center><script language=javascript><!--
            document.write('<scr'+'ipt language=javascript src="http://a.tribalfusion.com/j.ad?site=RealityLapsecom&adSpace=ROS&size=160x600&type=var&requestID='+((new Date()).getTime() % 2147483648) + Math.random()+'"></scr'+'ipt>');
            //-->
            </script>
            <noscript>
            <a href="http://a.tribalfusion.com/i.click?site=RealityLapsecom&adSpace=ROS&size=160x600&requestID=328743598" target=_blank>
            <img src="http://a.tribalfusion.com/i.ad?site=RealityLapsecom&adSpace=ROS&size=160x600&requestID=328743598" 
                    width=160 height=600 border=0 alt="Click Here"></a>
            </noscript>
            </center>
            <!-- TF 160x600 JScript VAR code -->

        </div>
        <div class="menucategory">Affiliates</div>
        <ul>

                <li><a href="http://www.ayksolutions.com/affiliates/idevaffiliate.php?id=118">AYKsolutions Hosting</a></li>
        </ul>
        <script type="text/javascript"><!--
        google_ad_client = "pub-3647927329712479";
        google_ad_width = 120;
        google_ad_height = 240;
        google_ad_format = "120x240_as";
        google_ad_type = "text_image";
        google_ad_channel = "";
        google_color_border = "231F1F";
        google_color_bg = "231F1F";
        google_color_link = "E36321";
        google_color_text = "1E80EF";
        google_color_url = "1E80EF";
        //-->
        </script>
        <script type="text/javascript"
        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
        <script type="text/javascript"><!--
        google_ad_client = "pub-3647927329712479";
        google_ad_width = 120;
        google_ad_height = 240;
        google_ad_format = "120x240_as";
        google_ad_type = "text_image";
        google_ad_channel = "";
        google_color_border = "231F1F";
        google_color_bg = "231F1F";
        google_color_link = "E36321";
        google_color_text = "1E80EF";
        google_color_url = "1E80EF";
        //-->
        </script>
        <script type="text/javascript"
        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>

    </div>
</div>
<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=1417147; 
var sc_invisible=1; 
var sc_partition=11; 
var sc_security="dc31214e"; 
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img  src="http://c12.statcounter.com/counter.php?sc_project=1417147&java=0&security=dc31214e&invisible=1" alt="cool hit counter" border="0"></a> </noscript>
<!-- End of StatCounter Code -->
</body>
</html>
array(3) {
  ["section"]=>
  string(11) "cowboybebop"
  ["type"]=>
  string(6) "videos"
  ["filename"]=>
  string(18) "cowboybebop01.rmvb"
}
Link to comment
Share on other sites

HI,

try this pattern: (?<=href=").*(?=">Zeta server</a>)

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Hi,

I saved your code above in text.txt and ran this:

Global $str = FileRead(FileOpen(@ScriptDir & '\text.txt',0))
$link = StringRegExp($str, '(?<=href=").*(?=">Zeta server</a>)', 1)
MsgBox(64, 'Link', $link[0])

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Thanks man so long :)

This is realitylapse.com Anime Ripper

Here's my final script. Any comments or advices?

#include <array.au3>
#include <IE.au3>
#include <Inet.au3>
 dim $link[200],$a


 
for $i=1 to 23
    if $i <10 then $i = "0" & $i

$oIE = _IECreate ("http://realitylapse.com/downloads/videos/cowboybebop/cowboybebop" & $i & ".rmvb",0,0)

$o_form = _IEFormGetObjByName ($oIE, "speedForm")
$o_login = _IEFormElementGetObjByName ($o_form, "username")
$o_password = _IEFormElementGetObjByName ($o_form, "password")
$o_signin = _IEFormElementGetObjByName ($o_form, "Submit")
 
$username = "user"
$password = "pass"
 
; Set field values and submit the form
_IEFormElementSetValue ($o_login, $username)
_IEFormElementSetValue ($o_password, $password)
_IEAction ($o_signin, "click")

FileWrite("c:\asd.txt",_IEDocReadHTML($oIE))
;~ $str=FileRead("c:\text.txt")
Global $str = FileRead(FileOpen('c:\asd.txt',0))
$link = StringRegExp($str, '(?<=href=").*(?=">Zeta server</a>)', 1)
$a=$a+1
    FileWriteLine("C:\links.txt",$link[0])
    FileDelete("c:\asd.txt")
    next
Link to comment
Share on other sites

Hi,

maybe you can avoid to write a file by using _INetGetSource and do the RegExp on the return of the func.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

My final working script combined with free download manager

#include <array.au3>
#include <IE.au3>
#include <Inet.au3>
dim $link[200],$a

$a=0

for $i=1 to 2
    if $i <10 then $i = "0" & $i

$oIE = _IECreate ("http://realitylapse.com/downloads/videos/cowboybebop/cowboybebop" & $i & ".rmvb",0,0)

$o_form = _IEFormGetObjByName ($oIE, "speedForm")
$o_login = _IEFormElementGetObjByName ($o_form, "username")
$o_password = _IEFormElementGetObjByName ($o_form, "password")
$o_signin = _IEFormElementGetObjByName ($o_form, "Submit")

$username = "user"
$password = "pass"

; Set field values and submit the form
_IEFormElementSetValue ($o_login, $username)
_IEFormElementSetValue ($o_password, $password)
_IEAction ($o_signin, "click")
_IELoadWait($oIE)
FileWrite(fileopen("c:\asd.txt",2),_IEDocReadHTML($oIE))
Global $str = FileRead(FileOpen('c:\asd.txt',0))
$link = StringRegExp($str, '(?<=href=").*(?=">Download from the Zeta server</A>)', 1)

;~ msgbox(0,"123",$link[0])
$a=$a+1
    FileWriteLine("C:\links.txt",$link[0])

    next
ClipPut(FileRead(FileOpen('c:\links.txt',0)))

    WinActivate("Free Download")
    
    send("^+v")
    WinWait("Choose")
    WinActivate("Choose")
    send("{ENTER}")
Link to comment
Share on other sites

HI,

I meant something like:

#include <array.au3>
#include <IE.au3>
#include <Inet.au3>
Dim $link[200], $a

For $i = 1 To 23
    If $i < 10 Then $i = "0" & $i

    $oIE = _IECreate("http://realitylapse.com/downloads/videos/cowboybebop/cowboybebop" & $i & ".rmvb", 0, 0)

    $o_form = _IEFormGetObjByName($oIE, "speedForm")
    $o_login = _IEFormElementGetObjByName($o_form, "username")
    $o_password = _IEFormElementGetObjByName($o_form, "password")
    $o_signin = _IEFormElementGetObjByName($o_form, "Submit")

    $username = "user"
    $password = "pass"

    ; Set field values and submit the form
    _IEFormElementSetValue($o_login, $username)
    _IEFormElementSetValue($o_password, $password)
    _IEAction($o_signin, "click")

    $link = StringRegExp(_IEDocReadHTML($oIE), '(?<=href=").*(?=">Zeta server</a>)', 1)
    $a += 1
    FileWriteLine("C:\links.txt", $link[0])
Next

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

You might also want to look at _IELingGetCollection -- the example in the helpfile shows how to loop through them and get the href's

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

This way script is much better. Put a control not to login if already logged.

#include <array.au3>
#include <IE.au3>
#include <Inet.au3>
Dim $link[200]

For $i = 1 To 23
    If $i < 10 Then $i = "0" & $i

    $oIE = _IECreate("http://realitylapse.com/downloads/videos/cowboybebop/cowboybebop" & $i & ".rmvb", 0, 0)
if StringInStr(_IEDocReadHTML($oIE),"logout")=0 Then
    $o_form = _IEFormGetObjByName($oIE, "speedForm")
    $o_login = _IEFormElementGetObjByName($o_form, "username")
    $o_password = _IEFormElementGetObjByName($o_form, "password")
    $o_signin = _IEFormElementGetObjByName($o_form, "Submit")

    $username = "user"
    $password = "pass"

    ; Set field values and submit the form
    _IEFormElementSetValue($o_login, $username)
    _IEFormElementSetValue($o_password, $password)
    _IEAction($o_signin, "click")
    EndIf
    _IELoadWait($oIE)
    $link = StringRegExp(_IEDocReadHTML($oIE), '(?<=href=").*(?=">Download from the Zeta server</A>)', 1)
    FileWriteLine("C:\links.txt",$link[0])

    next
ClipPut(FileRead(FileOpen('c:\links.txt',0)))

    WinActivate("Free Download")
    
    send("^+v")
    WinWait("Choose")
    WinActivate("Choose")
    send("{ENTER}")

@DaleHohm

I used _IELinkGetCollection before. But it missed links. This way it's better i think.

Anime lovers should subscribe to realitylapse. 5$ for a month. And has quality service. But they don't have FTP. And i had to write this to download something :)

Link to comment
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
 Share

  • Recently Browsing   0 members

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