PurpleSector 0 Posted July 29, 2012 Report Share Posted July 29, 2012 I want to make sure when I sign up to a site, in this case Wikis, that the sign up is correct. Since many Wikis are in other languages than English, the only way to check is by searching for the username used. However, it doesn't work. I don't know how many different ways I have tried. The result is always the same, it doesn't find the username. For example you could try to scrape the following attribute (in German): <a href="/mediawiki/index.php?title=Benutzer:Dfgdfg" title="Eigene Benutzerseite [alt-.]" accesskey="." class="new">Username</a> from this site: http://computerschule-niederrad.de:7080/mediawiki/index.php?title=Spezial:Anmelden&type=signup The username is also present in a headline, but that didn't work either. I have tried to use the document text and other ways to verify the sign up, but to no avail. Any help welcome! Quote Link to post Share on other sites
jomark3 25 Posted July 29, 2012 Report Share Posted July 29, 2012 Have you tried logging out, wait a few seconds, then logging in? If it allows you to log in, it accepted your sign up. Quote Link to post Share on other sites
PurpleSector 0 Posted July 29, 2012 Author Report Share Posted July 29, 2012 Yeah, it can be done in that way but that takes too much time. Speed is very important when you have thousands of URLs to check to see if they are valid. Quote Link to post Share on other sites
nuc63 27 Posted July 29, 2012 Report Share Posted July 29, 2012 Use the search function not scrape to determine if signup successful Quote Link to post Share on other sites
PurpleSector 0 Posted July 30, 2012 Author Report Share Posted July 30, 2012 I have tried that as well, but it doesn't work properly. About half of the time is doesn't find the user name for some reason. I have tried to add Wait for several seconds but still doesn't work. Quote Link to post Share on other sites
a2mateit 395 Posted July 31, 2012 Report Share Posted July 31, 2012 This is working for me... navigate("http://computerschule-niederrad.de:7080/mediawiki/index.php?title=Spezial:Anmelden&type=signup", "Wait") set(#username, "{$account data("Username")}{$rand(01, 100)}", "Global") set(#password, $account data("Password"), "Global") run javascript("document.getElementsByName(\"wpName\")[0].value =\"{#username}\";") run javascript("document.getElementById(\"wpPassword2\").value =\"{#password}\";") run javascript("document.getElementById(\"wpRetype\").value =\"{#password}\";") run javascript("document.getElementById(\"wpEmail\").value =\"{$account data("Email")}\";") run javascript("document.getElementById(\"wpRealName\").value =\"{$account data("First name")} {$account data("Last name")}\";") click(<name="wpCreateaccount">, "Left Click", "No") wait(3) wait for browser event("Page Loaded", "") if($exists(<id="pt-userpage">)) { then { add item to list(%results, "{$url},{#username},{#password}", "Delete", "Global") } } HTH,Justin Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.