Suchscripte (Youtube, Yahoo, Google, etc) abfragen

  • Öhm bei Zeile 18, StringRegExp, kannste mal das Zeug wie .+(v=.+?) und [^"]+ erklären?

    Am besten guckst du dir das Tutorial zu StringRegExp von Seubo an.
    Weil StringRegExp kannst du sicher noch öfters gebrauchen 8)


    Aber sonst läuft das doch auch über Quelltext, warum also nicht nur, wie oben bereits erwähnt, InetRead?

    Ich denke InetRead macht eigentlich nix anders, als was ich gemacht habe :p
    Also Ja geht natürlich auch mit InetRead.

    Lg, Fabian

  • Urgh, ne Referenz zur RegExp-eigenen Zeichenverwendung wäre besser, naja werd ich noch ne Weile dran kauen.

    Wenn ich es so mache, spuckt's bei den hinteren Ergebnissen zu viel aus (src & thumb):

    [autoit]


    'http://www.youtube.com/results?search_query=hello&page=1'

    [/autoit][autoit][/autoit][autoit]

    '<a href=".+(v=.+?)" class="[^"]+" id="[^"]+" ><span class="img"><img(?: onload="tn_load\(\d+\);")? src="(.+)"(?: thumb="[^"]+
    ")? onclick="" title="(.+)"></span>'

    [/autoit]

    Wenn ich (.+) bei thumb einsetze, spuckts für die ersten Ergebnisse garnix aus... und die hinteren wieder zu viel.

  • @Fabian: Wofür hast du denn Easy_WinHTTP verwendet? Genau dafpr gibt es doch _WinHttpSimpleRequest ;)

  • ...urgh...

    (.+) wiederholt also die Suche bis zum Ende der Zeile wtf?!
    Iwie blick ich da nicht durch oô

  • Code
    <li>Players Online: 9114</li>
    <li>Server Status: On</li>
    [autoit]

    $string = StringRegExp($read,'<li>.+(Players Online .+?)</li>',1)
    $string2 = StringRegExp($read,'<li>.+(Server Status .+?)</li>',1)

    [/autoit]

    Iwie hab ichs immer noch nich kapiert :x
    Immer Errorcode 1, nix gefunden :x

    EDIT: Aber die Seite stimmt, und der Quelltext ändert sich im Bezug auf "Players Online" und "Server Status" nicht, nur die nachfolgenden Werte :x
    Und die beiden Zeilen sind nur 1 mal vorhanden oô

  • Spoiler anzeigen
    [autoit]

    #include <array.au3>
    $string = '<li>Players Online: 9114</li>'

    [/autoit] [autoit][/autoit] [autoit]

    $aResult = StringRegExp($string, "<li>Players\sOnline:\s(\d+)</li>", 1, 1)
    _ArrayDisplay($aResult)

    [/autoit] [autoit][/autoit] [autoit]

    #cs ### Output ###
    [0] 9114
    #ce

    [/autoit] [autoit][/autoit] [autoit]

    $string = '<li>Server Status: On</li>'

    [/autoit] [autoit][/autoit] [autoit]

    $aResult = StringRegExp($string, "<li>Server\sStatus:\s(\w+)</li>", 1, 1)
    _ArrayDisplay($aResult)

    [/autoit] [autoit][/autoit] [autoit]

    #cs ### Output ###
    [0] On
    #ce

    [/autoit]
  • ...wenn ich das ganze auf den kompletten Quelltext anwende funzt es nicht oô

    Spoiler anzeigen

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head xml:lang="en">

    <!--
    copyright NOTICE
    This document and all of its design elements: HTML, graphics and layout are the property of S4Project.
    Copyright © 2007 - 2010 S4Project - ALL RIGHTS RESERVEDVersion 0.0.3IT IS STRICTLY PROHIBITED TO DIRECTLY USE ANY PORTION OF THE HTML AND GRAPHICAL ASPECTS OF THIS DOCUMENT.
    For more information refer to the Terms Of Use and Disclaimer information found at (http://s4project.net).
    S4Project claims ownership and copyright of all works on this site and does not give permission for them
    to be recreated in any way unless otherwise stated.
    -->

    <!--TITLE DATA-->
    <title>S4Project: Home</title>

    <!--META DATA-->
    <meta http-equiv="title" content="S4Project: Home" />
    <meta http-equiv="content-type" xml:lang="en" content="application/xhtml+xml;charset=utf-8;" />
    <meta http-equiv="content-language" xml:lang="en" content="en" />
    <meta http-equiv="designer" content="S4Project Staff" />
    <meta http-equiv="resource-type" xml:lang="en" content="document" />
    <meta http-equiv="description" xml:lang="en" content="An online S4 League data fansite." />

    <meta http-equiv="keywords" xml:lang="en" content="s4league S4 alaplaya player s4 league ranking player database S4P s4project" />
    <meta http-equiv="author" xml:lang="en" content="S4Project Staff" />
    <meta http-equiv="generator" xml:lang="en" content="S4Project Staff" />
    <meta http-equiv="copyright" xml:lang="en" content="Copyright © 2007 - 2010 S4Project - ALL RIGHTS RESERVED" />
    <meta http-equiv="category" xml:lang="en" content="Games" />
    <meta http-equiv="robots" xml:lang="en" content="index,follow" />
    <meta http-equiv="DC.format" xml:lang="en" content="application/xhtml+xml" />
    <meta http-equiv="DC.language" xml:lang="en" content="en" />
    <meta http-equiv="DC.type" xml:lang="en" content="Service" />
    <meta http-equiv="DC.title" xml:lang="en" content="S4Project Staff" />
    <meta http-equiv="DC.creator" xml:lang="en" content="S4Project Staff" />
    <meta http-equiv="DC.description" xml:lang="en" content="An online S4 League data fansite." />
    <meta http-equiv="DC.subject" xml:lang="en" content="s4league S4 alaplaya player s4 league ranking player database S4P s4project" />

    <!--LINK DATA-->
    <link rel="home" href="/" xml:lang="en" />
    <link rel="schema.vw96" href="https://autoit.de/view-source:%5….html%5B/url%5D" xml:lang="en" />

    <!--<link rel="icon" type="image/vnd.microsoft.icon" href="http://s4project.net/html/img/icons/favicon/default.ico" />-->

    <!--STYLE DATA-->
    <link rel="stylesheet" href="https://autoit.de/view-source:%5…t.css%5B/url%5D" type="text/css" media="screen" charset="utf-8" />

    <!--JAVASCRIPT DATA-->
    <script type="text/javascript" src="https://autoit.de/view-source:%5…al.js%5B/url%5D"></script>

    </head>
    <body>

    <!--PAGE-->
    <div id="page-container">

    <!--HEADER / LOGO-->

    <div id="header-bar">Welcome: 91.14.236.99</div>
    <div id="header">
    <div>
    <h1>S4Project</h1>
    <p>An online S4 League data fansite.</p>
    </div>
    </div>

    <!--MENU-->
    <div id="menu-container">
    <ul class="menu">
    <li><a rel="navigation" href="https://autoit.de/view-source:%5….net/%5B/url%5D">Home</a></li>
    <li><a rel="navigation" href="https://autoit.de/view-source:%5…age-1%5B/url%5D">Character Database</a></li>
    <li><a rel="external" href="https://autoit.de/view-source:%5….net/%5B/url%5D">Wiki</a></li>
    <li><a rel="external" href="https://autoit.de/view-source:%5….net/%5B/url%5D">Gallery</a></li>

    <li><a rel="external" href="https://autoit.de/view-source:%5…/chat%5B/url%5D">Chatroom</a></li>
    </ul>
    </div>

    <!--SIDEBAR-->
    <div id="sidebar">
    <div class="sidebar-item">
    <div class="generic-div-heading"><h2>Character</h2></div>

    <ul>
    <li><a href="https://autoit.de/view-source:%5…r/add%5B/url%5D">Add A Character</a></li>
    <li><a href="https://autoit.de/view-source:%5…age-1%5B/url%5D">Character Database</a></li>
    <li><a href="https://autoit.de/view-source:%5…earch%5B/url%5D">Character Search</a></li>
    </ul>
    </div>

    <div class="sidebar-item">

    <div class="generic-div-heading"><h2>S4Project</h2></div>
    <ul>
    <li><a rel="external" href="https://autoit.de/view-source:%5….net/%5B/url%5D">Wiki</a></li>
    <li><a rel="external" href="https://autoit.de/view-source:%5….net/%5B/url%5D">Gallery</a></li>
    <li><a rel="external" href="https://autoit.de/view-source:%5…/chat%5B/url%5D">Chatroom</a></li>
    </ul>
    </div>


    <!--<div class="sidebar-item">
    <div class="generic-div-heading"><h2>Help</h2></div>
    <ul>
    <li><a rel="external" href="http://wiki.s4project.net">Wiki</a></li>
    <li><a rel="external" href="http://img.s4project.net">Gallery</a></li>
    <li><a rel="external" href="http://s4project.net/chat">Chatroom</a></li>
    </ul>
    </div>-->

    <div class="sidebar-item">
    <div class="generic-div-heading"><h2>Server Information</h2></div>
    <ul>
    <li>Players Online: 7411</li>
    <li>Server Status: On</li>
    </ul>

    </div>

    <div class="sidebar-item">
    <div class="generic-div-heading"><h2>Partner Sites</h2></div>
    <ul>
    <li><a rel="external" href="https://autoit.de/view-source:%5….com/%5B/url%5D">S4 Source</a></li>
    <li><a rel="external" href="https://autoit.de/view-source:%5…eague%5B/url%5D">JPN S4 League Wiki</a></li>
    </ul>

    </div></div>

    <!--CONTENT-->
    <div id="content">
    <div class="generic-div">
    <div class="generic-div-heading">
    <h3>S4 Project Version 3 40% Done</h3>
    <em>Posted: 2010-10-16 @ 14:25 GMT<br />

    By: kp,
    In: General</em>
    </div>
    <p>S4project Version 3 is roughly 40% done, I know you are all experiencing errors with the signature changers. This will be fixed in version 3, so wait for it!<br />
    I'm aiming to get version 3 beta 1 up and running by 5th November, because I am focusing on version 3, I will NOT be able to fix s4project right now, but will have a look at it soon.<br />
    Until then sit tight and wait, for any ideas for s4project version 3, please come in the chatroom and ask for KP or Ceska.</p>
    <div class="generic-div-heading">
    <em>Comments Disabled</em>

    </div>
    </div>
    <div class="generic-div">
    <div class="generic-div-heading">
    <h3>S4 Project Version 3</h3>
    <em>Posted: 2010-08-12 @ 12:31 GMT<br />
    By: kp,
    In: General</em>
    </div>

    <p>Yes, I'm still alive, I've just been busy IRL, moving, new job and translating. I don't play S4 anymore, but I will be still developing s4project.net, s4source.com and chs5.net.<br />
    Which brings me on to say, I've been working on version 3 of s4project, and hope to release it in the coming weeks.<br />
    When I'm more sure of what version 3 will bring, I will start to give clues, but until then it's hush-hush ;).<br />
    Several people have e-mailed me and PM`d me about the current errors they're experiencing whilst using s4project, don't worry about them I know about it, and will work on it in due time.</p>
    <div class="generic-div-heading">
    <em>Comments Disabled</em>

    </div>
    </div>
    <div class="generic-div">
    <div class="generic-div-heading">
    <h3>Custom S4 League eSper License Signature Cards Fixed</h3>
    <em>Posted: 2010-01-08 @ 06:58 GMT<br />
    By: kp,
    In: General</em>
    </div>

    <p>Forgot to post, but I've FIXED the custom signatures again, and added some new rules to the image uploader (<a rel="external" href="https://autoit.de/view-source:%5….net/%5B/url%5D">http://img.s4project.net</a>), from now on we don't accept interlaced PNGs, for security reasons, and technical.<br />
    Also, over 500 players are using the new custom signature license!! If this keeps up, we can be adding new features and suggestions, so please spread the word!<br /><br />

    In other news, I might be away for a week or so because of graduate exams, because of that the wiki and other updates, may NOT happen till February, I'm trying to see if other people might be able to assist.<br /><br />

    <strong><em>Also, will people get off my back about calling me a 2-bit hacker, my lililili account is not assoicated with hackers, ask any GM and they can confirm this.</em></strong></p>
    <div class="generic-div-heading">
    <em>Comments Disabled</em>

    </div>
    </div>
    <div class="generic-div">
    <div class="generic-div-heading">
    <h3>Custom eSper License Cards Quick Maintenance</h3>
    <em>Posted: 2010-01-06 @ 15:05 GMT<br />
    By: kp,
    In: General</em>

    </div>
    <p>I've had to take down the custom eSper License Cards for a quick maintenance, they will be back online in a couple hours, sorry about this!!!</p>
    <div class="generic-div-heading">
    <em>Comments Disabled</em>
    </div>
    </div>
    <div class="generic-div">
    <div class="generic-div-heading">

    <h3>Custom eSper License Card Backgrounds + HAPPY NEW YEAR</h3>
    <em>Posted: 2010-01-01 @ 12:50 GMT<br />
    By: kp,
    In: General</em>
    </div>
    <p>
    First off....<br /><br />
    <strong>HAPPY NEW YEAR !</strong><br /><br />

    <strong>List of BugFixes and Improvements</strong><br />
    - Finally, enabled Custom License Backgrounds now, a guide on how to change them is here: <a rel="external" href="https://autoit.de/view-source:%5….net/%5B/url%5D">http://forums.chs5.net</a>.<br />
    - The signatures weren't updating properly due to NetRunner's experience points, that's been fixed now.<br />
    - I started banning people on the Image Uploadr (<a rel="external" href="https://autoit.de/view-source:%5….net/%5B/url%5D">http://img.s4project.net</a>), please be warned, if you're banned, you won't get unbanned, so behave ;).<br />
    - Costume Simulator is at 30%, I need some help with it, if people have any free time.<br /><br />

    <em>Happy New Year Again!</em>
    </p>
    <div class="generic-div-heading">
    <em>Comments Disabled</em>
    </div>
    </div>
    <div class="generic-div">
    <div class="generic-div-heading">

    <h3>Bug Fixes and Updated Image Gallery</h3>
    <em>Posted: 2009-12-28 @ 20:34 GMT<br />
    By: kp,
    In: General</em>
    </div>
    <p>
    Did some more bugfixing and added some features!<br /><br />
    - <strong>ATTENTION** - I changed the character database update time to 10AM GMT, but now the signatures/license cards generate EVERY 5 MINUTES!</strong><br />

    - Fixed time online for character's when you view their page.<br />
    - <strong>Updated the Image Gallery!! (<a rel="external" href="https://autoit.de/view-source:%5….net/%5B/url%5D">http://img.s4project.net</a>). Check it out!</strong><br />
    - Updated signature/license card generator to be faster!<br />
    - <strong>Added feature to allow you to change the colour of your license card.</strong><br />
    - Re-cached character data, and cleaned out the database.<br />

    - Built LIVE Weapon Equipment <em>Alpha</em> ver.1, <em>going to release it soon!</em><br />
    - Started work, on the costume simulator.<br /><br />
    <em>Some nice people in #s4, gifted me L4D-2 for christmas, a big shout out to them, and thank you. :)</em>
    </p>
    <div class="generic-div-heading">

    <em>Comments Disabled</em>
    </div>
    </div>
    <div class="generic-div">
    <div class="generic-div-heading">
    <h3>Character Levels and Signature Re:Fixed</h3>
    <em>Posted: 2009-12-26 @ 17:55 GMT<br />

    By: kp,
    In: General</em>
    </div>
    <p>There was an error with some of the license card/signatures, I just fixed them, they should be generating properly now.</p>
    <div class="generic-div-heading">
    <em>Comments Disabled</em>
    </div>
    </div>

    <div class="generic-div">
    <div class="generic-div-heading">
    <h3>Minor Updates List</h3>
    <em>Posted: 2009-12-26 @ 12:00 GMT<br />
    By: kp,
    In: General</em>
    </div>
    <p>


    <strong>~ Updates...</strong><br />
    - Fixed and updated character search, it's even faster now.<br />
    - Character statistics now updated ONCE DAILY at 06:00 GMT.<br />
    - Character license cards / signatures now updated ONCE EVERY 10 MINS.<br /><br />

    <strong>~ Chat log of the internet tough guy</strong><br />
    <em>

    --> rofflmao (cgiirc@Rizon-7608540F.hsi2.kabel-<strong>badenwuerttemberg.de</strong>) has joined #s4...<br />
    <rofflmao> i wanna ask what s4 pro is?<br />
    <kp> s4p is<br />

    <Syncytium> s4p is kp's life<br />
    <kp> what a bored programmer like me<br />
    <kp> does<br />
    <rofflmao> okay i better go watch some porn, than waste my time with noob coders?<br />

    <kp> noob?<br />
    <rofflmao> so piece out niggerz<br />
    <kp> coders?<br />
    <kp> .kb rofflmao<br />

    --- |f`-`|f sets ban on *!*cgiirc@*.hsi2.kabel-<strong>badenwuerttemberg.de</strong><br />
    <-- |f`-`|f has kicked rofflmao from #s4 (Requested)<br /><br />
    </em>
    <strong>It's annoying to have you idiots come into S4 Project's chatroom everyday asking the same stupid questions, so let's set some things straight.</strong><br />
    </p>

    <ul>
    <li>S4 Project is a FANSITE, F-A-N-S-I-T-E, that collects data on the game S4 league.</li>

    <li>Some random idiots have posted on a lot of forums, saying I have a "<strong>resource tool</strong>", that is true and false.<br />
    - <strong>True</strong>, because I have programs/scripts (created by me and others from the SPv Project) which was used to check for information A LONG LONG time ago.<br />
    - <strong>False</strong>, because these set of programs have nothing to do with what you idiots are calling "<strong>resource tool</strong>".</li>

    <li>Don't come <strong>TO ME</strong>, and <strong>DEMAND</strong> things <strong>WHICH</strong> you don't even understand, or <strong>KNOW</strong> how to make.</li>
    <li>Learn ASM, C#, some C, then come back, maybe I'll be interested in what you have to say.</li>

    <li>For all these people making <strong><em>COOL</em></strong> youtube videos of Vital Shock and other maps, this information has been in the exe, FOR A LONG LONG TIME. So relax, I doubt it will even be released.</li>
    <li>and finally, <strong>if the elitepvpers.de community continues to encourage all these idiots that can't program to ruin a perfectly nice game, I will begin submitting patches to Pentavision DIRECTLY.</strong></li>
    </ul>
    <br />
    <div class="generic-div-heading">
    <em>Comments Disabled</em>

    </div>
    </div>
    <div class="generic-div">
    <div class="generic-div-heading">
    <h3>Merry Xmas + Wiki + Image Gallery</h3>
    <em>Posted: 2009-12-25 @ 03:50 GMT<br />
    By: kp,
    In: General</em>

    </div>
    <p>
    ....all that jazz...<br /><br />

    - Added image gallery [http://img.s4project.net], you can upload random pictures to do with S4 League, anything else = IP ban.<br />
    - I started working on the wiki and correcting the old information pages, right now the completed pages are Submachine Gun and Plasma Sword.<br /><br />

    Also, some random idiot, posted about me on ElitePvpers, as I said before, don't come around here asking for anything, that = IP ban.<br /><br />
    Merry Christmas!
    </p>

    <div class="generic-div-heading">
    <em>Comments Disabled</em>
    </div>
    </div>
    <div class="generic-div">
    <div class="generic-div-heading">
    <h3>S4Project Revamp</h3>
    <em>Posted: 2009-12-23 @ 14:28 GMT<br />

    By: kp,
    In: General</em>
    </div>
    <p>
    As you can see I’ve cut down S4 Project a lot, and revamped it. <br /><br />

    - This new system updates stats EVERY 24 HOURS, and cards EVERY 3 HOURS. (IT ACTUALLY WORKS, NO JOKE).<br />
    - If you add a character you have to wait 3 hours before your card will be generated.<br />
    - Also for custom backgrounds and colours, I will think about how to integrate them again, for now they are disabled.<br />

    - This current system does not require user registration, so don't ask about linking characters, that function no longer works.<br />
    - I trashed the translations system, it's not needed now.<br />
    - Forums have been trashed, go to s4source.com or mys4league.com if you need drama or lulz.<br />
    - I will soon be creating a weapons database, which will show a character’s live equipment status, if you want to beta test it, please come into the chatroom and ask for me.<br />
    - I’m going to start working on the wiki this week.<br /><br />

    On a final note, the next idiot to ask me for hack, or to take apart the exe for them, or give them extra character data, will be subnet banned from s4project.net :D<br /><br />

    Seasons Greetings!!
    </p>
    <div class="generic-div-heading">
    <em>Comments Disabled</em>
    </div>
    </div></div>

    </div>

    <!--FOOTER-->

    <div id="footer">
    <a rel="external" href="https://autoit.de/view-source:%5…ferer%5B/url%5D">
    <img style="width:80px; height:15px;" src="https://autoit.de/view-source:%5…1.gif%5B/url%5D" alt="Valid XHTML 1.0 Strict" /></a>
    <a rel="external" href="https://autoit.de/view-source:%5…ferer%5B/url%5D">
    <img style="width:80px; height:15px;" src="https://autoit.de/view-source:%5…s.gif%5B/url%5D" alt="Valid CSS!" /></a>
    <a rel="external" href="https://autoit.de/view-source:%5….org/%5B/url%5D">
    <img style="width:85px; height:15px;" src="https://autoit.de/view-source:%5…s.gif%5B/url%5D" alt="Cent OS Powered" /></a>
    <a rel="external" href="https://autoit.de/view-source:%5….org/%5B/url%5D">
    <img style="width:80px; height:15px;" src="https://autoit.de/view-source:%5…e.gif%5B/url%5D" alt="Apache Powered" /></a>

    <a rel="external" href="https://autoit.de/view-source:%5….net/%5B/url%5D">
    <img style="width:80px; height:15px;" src="https://autoit.de/view-source:%5…p.gif%5B/url%5D" alt="PHP Powered" /></a>
    <a rel="external" href="https://autoit.de/view-source:%5….com/%5B/url%5D">
    <img style="width:80px; height:15px;" src="https://autoit.de/view-source:%5…l.gif%5B/url%5D" alt="MySQL Powered" /></a>
    <a rel="external" href="https://autoit.de/view-source:%5….com/%5B/url%5D">
    <img style="width:80px; height:15px;" src="https://autoit.de/view-source:%5…x.png%5B/url%5D" alt="Get Firefox - The Browser, Reloaded." /></a><br />
    Copyright © 2007 - 2010 S4Project - ALL RIGHTS RESERVED</div>

    <!--OTHER DATA (Google, Api's, Etc) -->
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    try {
    var pageTracker = _gat._getTracker("UA-942545-10");
    pageTracker._setDomainName(".s4project.net");
    pageTracker._trackPageview();
    } catch(err) {}</script>

    </body>
    </html>


    Zeile 108/109 :x

  • &quot;bei mir schon&quot;
    [autoit]


    $aResult = StringRegExp($string, "<li>Players\sOnline:\s(\d+)</li>", 1, 1)
    _ArrayDisplay($aResult)

    [/autoit] [autoit][/autoit] [autoit]

    #cs ### Output ###
    [0] 7411
    #ce

    [/autoit] [autoit][/autoit] [autoit]

    $aResult = StringRegExp($string, "<li>Server\sStatus:\s(\w+)</li>", 1, 1)
    _ArrayDisplay($aResult)

    [/autoit] [autoit][/autoit] [autoit]

    #cs ### Output ###
    [0] On
    #ce

    [/autoit] [autoit][/autoit] [autoit][/autoit]
  • [autoit]

    $read = InetRead("http://s4project.net/")
    $aResult = StringRegExp($read, "<li>Server\sStatus:\s(\w+)</li>", 1, 1)
    _ArrayDisplay($aResult)

    [/autoit]


    Geht net oô