Jump to content

Text from a Website Source


Recommended Posts

Goal: I want get a text from a website and save it.

I know how save stuff in autoit, I just dont know how to get a specific text from a website by viewing source.

The website is http://www.archlordgame.com/freetoplay.php and i need bot to get the line and extract the key which is AT13A-XX-XXXX .... etc. *The key will change everytime you refresh.

<div id="key_box"><span id="copytext">AT13A-WEJXV-PHQ7X-0VNLF-GBBW9</span></div>

I looked into the HELPFILE and The closest thing I got was getting the source. But I couldnt find what to do next.

#include <INet.au3>
ConsoleWrite(_INetGetSource('http://www.archlordgame.com/freetoplay.php'))
Link to comment
Share on other sites

#include <INet.au3>
$source = ConsoleWrite(_INetGetSource('http://www.archlordgame.com/freetoplay.php')

$key = StringRegExp($source, '(\w{5}-\w{5}-\w{5}-\w{5}-\w{5})', 1)

ConsoleWrite( $key[0] & @CRLF)

This regexp works fine, but it looked like you have to manually enter a anti-bot code in order to get to that page

<img src="images/freetoplay/EnglishUSA/step1.jpg" alt="Claim your key" /><br />
      <form name="keyentry" action="/freetoplay.php" method="POST">

So unless you know a way around that ^ its not going to work

It worked fine when I copied / pasted the source page to a temp file and ran the regex on it

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...