AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Login to Adsense and download the amount of money.

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Oct 18, 2007 7:31 pm    Post subject: Login to Adsense and download the amount of money. Reply with quote

Hey !
I want to write a small program that

1. logs in to google adsense
2. downloads the first page to a file

from there I know what to do.

I tried cURL but I did not manage to download it as I wasn't able to extract the whole url(seems like the pw is directly encrypted or something)

Please give me the cURL command line for this. If it downloads the following site then we're already done Very Happy

Regards

CM
Back to top
CircuitryMaker



Joined: 28 Jan 2006
Posts: 24

PostPosted: Thu Oct 18, 2007 11:12 pm    Post subject: Reply with quote

Some more information how to solve it, please

(The previous post was written by me)
Back to top
View user's profile Send private message Visit poster's website
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Fri Oct 19, 2007 1:10 am    Post subject: Reply with quote

i don't expect many of us have an adsense account. you must show us how you do it manually, so someone may try to help you.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
CircuitryMaker



Joined: 28 Jan 2006
Posts: 24

PostPosted: Fri Oct 19, 2007 2:47 am    Post subject: Reply with quote

Okay:

1. Go to: adsense.google.com

2. Get this:
Code:
<html><head><title>Willkommen bei AdSense</title><!--
<LINK href="AdsLater_8_19_05.css" rel=stylesheet><LINK href="fontfix.css" rel=stylesheet>
-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body {font-size:83%;padding:1em 0.5em;margin:0;font-family:Arial, Helvetica, sans-serif;}
h1 {margin:0;font-weight:normal}
h2 {font-weight:normal;font-size:1.35em}
img {border:0;}
td {font-size:83%}

.bluelink {color:#0000cc;}
#footer {margin-top:2em;border-top:1px solid #ccc;padding:1em 0;color:#666;text-align:center;}
#infotable {border-collapse:}
#infotable p {margin:1em 0;}
#infotable td.menu {border:1px solid #ccc;border-bottom:0;padding:0.75em 0.5em;background:#eee;width:170px;height:40px;cursor:pointer;}
#infotable td.menu a {display:block;}
#infotable td.active {border-right:#fff 1px solid;background:#fff;}
#infotable td.active a {color:#000;text-decoration:none;}
</style>
<script type="text/javascript">
function changePreview(itemNumber) {
   document.getElementById('infotable1').style.display = 'none';
   document.getElementById('infotable2').style.display = 'none';
   document.getElementById('infotable3').style.display = 'none';
   document.getElementById('infotable4').style.display = 'none';
   document.getElementById('infotable5').style.display = 'none';
   document.getElementById('infotable6').style.display = 'none';
   document.getElementById('infotable7').style.display = 'none';
   document.getElementById('infotable8').style.display = 'none';
   document.getElementById('infotable' + itemNumber).style.display = '';
   tds = document.getElementById('infotable').getElementsByTagName('TD');
   for(i=0;i<tds.length;i++) {
      if(tds[i].className == 'active menu') tds[i].className = 'menu';
   }
}
</script>
<style type="text/css">
div.subheader {font-weight:bold;margin-bottom:2px;font-size:120%}
</style>
<script src="../../static/en_US/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
  _uacct="UA-18006-1";
  _utcp="/adsense/";
  _uanchor=1;
  _uccn="sourceid";
  _ucmd="medium";
  _ucsr="subid";
  _uctr="term";
  _ucct="content";
  _ucid="u_id";
  _ucno="nooverride";
  urchinTracker();
</script>
<style type="text/css">
     DIV.errormsg {font-SIZE: smaller; COLOR: red; font-FAMILY: arial,sans-serif}
    font.errormsg {font-SIZE: smaller; COLOR: red; font-FAMILY: arial,sans-serif}
</style>
</head><body>
<center>
<div style="width: 740px; text-align: left;">
    <table style="width: 100%;" cellpadding="0" cellspacing="0">
        <tbody><tr valign="middle">
          <td><a href="index.html"><img src="../../static/en_US/images/logo_main.gif" alt="Google AdSense" style="margin-bottom:6px;"></a></td>
          <td align="right">
            <script src="../../locale-form.js" type="text/javascript"></script>
            <br>          </td>
        </tr>
        <tr valign="top">

          <td style="padding: 10px 5px 5px 0pt;">
        <h1 style="font-size: 1.65em;">Mit relevanten Anzeigen auf Ihrer Website Geld verdienen</h1>
          <p style="margin: 0pt;">Google AdSense stimmt Anzeigen auf den Content Ihrer Website ab, und Sie erhalten jedes Mal Geld, wenn ein Benutzer auf die Anzeigen klickt.</p>
            <img src="../../static/de/images/homepage-garden.gif" width="408" height="222" style="margin: 20px 0pt 5px;" alt="">        </td>

          <td style="padding: 10px 0pt 5px 5px;">
            <div id="new_advertiser" style="border: 1px solid rgb(176, 201, 225); padding: 3px; background: rgb(255, 255, 255) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; text-align: center; margin-bottom: 1em;">
              <div style="padding: 5px; background: rgb(176, 201, 225) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
                <input onClick="location='../../apply';" name="Button2222" value="Jetzt anmelden" style="margin: 6px 0pt; padding: 4px 10px; font-size: 130%; font-weight: bold;" type="button">
              </div>
            </div>
            <div id="existing_advertiser">
              <!-- start login box -->
              <script src="../../login-box.js" type="text/javascript"></script>
              <noscript>
                Javascript is required for login
              </noscript>
              <!-- end login box -->
            </div>
          </td>
        </tr>
    </tbody></table>
<br>
  <table id="infotable" style="width: 100%;" cellpadding="0" cellspacing="0">
    <tbody><tr>
      <td colspan="2" style="border-style: solid solid none; border-color: rgb(204, 204, 204) rgb(204, 204, 204) -moz-use-text-color; border-width: 1px 1px 0pt; padding: 0.5em; background: rgb(176, 201, 225) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><b>Weitere Informationen zu AdSense</b></td>
   </tr>
    <tr>
      <td class="active menu"><a href="#" class="bluelink" onClick="changePreview('2');this.parentNode.className = 'active menu';urchinTracker('/adsense/overlay/products');return false;">Produkte</a></td>
      <td rowspan="8" style="border-style: solid solid solid none; border-color: rgb(204, 204, 204) rgb(204, 204, 204) rgb(204, 204, 204) -moz-use-text-color; border-width: 1px 1px 1px 0pt; padding: 0.75em 1em;" valign="top">

       <div id="infotable1" style="display: none;">
Google AdSense ist eine kostenlose und einfache Möglichkeit für Website-Publisher jeglicher Größe, relevante Google-Anzeigen auf den Content-Seiten ihrer Website zu schalten und so Einnahmen zu erzielen. Die Anzeigen beziehen sich auf das, was die Besucher auf Ihrer Website suchen, oder sind auf die Zielgruppe und damit auf die Interessen der Besucher abgestimmt, die der Inhalt Ihrer Website anzieht. <p align="center"><img src="../../static/de/images/stepbystep.gif" height="157" width="369" alt="Schritt für Schritt"></p>
        </div>

        <div id="infotable2">
      <b>AdSense für Content-Seiten</b> durchsucht den Content Ihrer Seiten automatisch und stellt Anzeigen bereit, die für die Zielgruppe und den Content Ihrer Website relevant sind. Dabei können Sie zwischen Text- und Image-Anzeigen wählen. Die Anzeigen sind so gut auf den Content Ihrer Website abgestimmt, dass die Besucher sie als nützlich empfinden. <p align="center"><img src="../../static/de/images/banner.gif" alt="Annonce"></p>
        <b>AdSense für Suchergebnisseiten</b> ermöglicht es den Website-Publishern, ihren Besuchern die Google-Websuche und SiteSearch anzubieten und gleichzeitig mit Google-Anzeigen auf den Suchergebnisseiten Geld zu verdienen. <p align="center"><img src="../../static/de/images/homepage-afs.gif" alt=""></p>
        </div>

        <div id="infotable3" style="display: none;">
          Dank der umfassenden <a href="https://adwords.google.de/select/Login#sourceid=awo&subid=ww-ww-et-ashp&medium=link">AdWords</a>-Inserentendatenbank verfügt Google über Anzeigen für alle Geschäftskategorien und buchstäblich für alle Arten von Content, egal wie speziell dieser ist.
<p>Mit der Google-Technologie werden die relevantesten und ergebnisstärksten AdWords-Anzeigen für Ihre Website ermittelt. Und da Google die Anzeigen liefert, brauchen Sie sich um die Pflege der geschäftlichen Kontakte mit den Inserenten nicht zu kümmern.</p>
        </div>

        <div id="infotable4" style="display: none;">

      <table style="margin: 0pt;" cellpadding="0" cellspacing="0"><tbody><tr><td style="padding-right: 1em;">
          Mit dem <b>Filter für Konkurrenzanzeigen</b> können Sie Anzeigen bestimmter Mitbewerber oder anderer Anzeigenkunden gezielt ausfiltern.</td><td>
<img src="../../static/de/images/page7_1.gif" alt="Filter"></td></tr>

<tr><td style="padding-right: 1em;"><p>Jede Google Anzeige muss in einer <b>redaktionellen Prüfung</b> durch das Google Team kontrolliert und genehmigt werden. Dadurch wird sichergestellt, dass auf Ihren Webseiten nur Anzeigen erscheinen, die unseren Richtlinien entsprechen.</p></td><td></td></tr>

<tr><td style="padding-right: 1em;"><p>
Alternative Anzeigen sind Anzeigen Ihrer Wahl, die nur in dem unwahrscheinlichen Fall geschaltet werden, dass Google einmal keine zielgerichteten Anzeigen für Ihre Webseite bereitstellen kann.
</p>

</td><td></td></tr>
</tbody></table>

        </div>

        <div id="infotable5" style="display: none;">
          <b>Wie berechnen sich meine Einnahmen?</b><br>
Jedes Mal, wenn auf Ihrer Website auf eine AdSense-Anzeige geklickt wird, erhalten Sie einen entsprechenden Betrag (Cost-Per-Click - CPC). Inserenten können auch Angebote auf der Basis Preis-pro-1000-Impressionen (Cost-Per-1000-Impressions - CPM) abgeben, um mit ihren Anzeigen auf Ihrer Website zu erscheinen. In unserem <a href="https://adwords.google.de/select/Login#&sourceid=awo&subid=ww-ww-et-ashp&medium=link">AdWords</a>-Programm treten CPC- und CPM-Gebote in einer Auktion gegeneinander an, damit Sie die höchsten Werbeeinnahmen erzielen.<br><br>
        <b>Zahlung per Banküberweisung</b><br>
In zahlreichen Ländern bieten wir bereits Zahlungen per Banküberweisung an. Damit erhalten Sie Ihre AdSense-Einnahmen jeden Monat direkt auf Ihr Bankkonto überwiesen, ohne dass Sie weitere Schritte unternehmen müssen.<br><br>
        <b>Wie hoch sind meine Einnahmen?</b><br>
Die Höhe Ihrer Einnahmen hängt von einer Reihe von Faktoren ab, u. a. von der Höhe des Gebots, das ein Inserent für eine Anzeige auf Ihrer Website abgibt. Von dem gezahlten Anzeigenpreis erhalten Sie einen entsprechenden Anteil. Sie können am besten herausfinden, wie hoch Ihre Einnahmen sind, indem Sie sich anmelden und mit der Veröffentlichung von Anzeigen auf Ihren Webseiten beginnen.</div>

        <div id="infotable6" style="display: none;">
          AdSense-Publisher werden Sie ganz einfach:
        <p align="center"><img src="../../static/de/images/stepbystep.gif"></p>
<table cellpadding="0" cellspacing="0">
        <tbody>
          <tr valign="top">
            <td width="12"></td>
            <td colspan="2" style="padding-right: 2em;"><b>Bewerben</b> </td>
            <td colspan="2" style="padding-left:3px;"><b>Anzeigencode einfügen</b> </td>
           </tr>
          <tr valign="top">
            <td></td> <td width="24"> 1. </td>
            <td width="300" style="padding-right:5px;"><a href="https://www.google.com/adsense/g-app-single-1?hl=de">Bewerben Sie sich online</a></td>
            <td width="32" style="padding-left:3px;">2.</td>
             <td width="825">Fügen Sie den Anzeigencode in Ihre Site ein.</td>
          </tr>
          <tr valign="top">
         <td></td><td colspan="2" style="padding-right: 2em;">&nbsp;</td><td style="padding-left:3px;">3. </td>
        <td>Bald darauf werden auf Ihrer Website zielgerichtete Anzeigen geschaltet.*</td>
         </tr></tbody></table>
        <p>* Die Aktualisierung unseres Systems kann bis zu 72 Stunden dauern.</p>
        </div>

      <div id="infotable7" style="display: none;">
Sie können das Aussehen der Anzeigen anpassen und dabei aus einer Vielzahl von Anzeigenblöcken und Farbformaten auswählen. Mit AdSense für Suchergebnisseiten können Sie auch das Suchfeld und die Suchergebnisseiten anpassen. <p><a href="../../static/de/AdFormats.html">Verfügbare Anzeigenformate</a></p>

         <p align="center"><img src="../../static/de/images/afc_color_new.gif" height="238" width="474" alt="Farvepalette"></p>
      </div>

      <div id="infotable8" style="display: none;">

         "Während Banner mit maximal 1 bis 3 Prozent Klickrate enttäuschen, kann AdSense mit Klickraten im zweistelligen Bereich glänzen."<br><br>
         <div style="text-align: right;">- <i> Marcel Klitzsch, www.hausgarten.net</i></div>

         <p>"Interessant erschien uns die Möglichkeit, ohne größeren Aufwand die vorhandene Reichweite besser zu vermarkten. Und das mit Werbeformen, die weder aufdringlich sind noch Standardwerbeplätze belegen."</p>
         <div style="text-align: right;">- <i> Ernst Demmel, Produktmanager, www.nachrichten.at</i></div>

         <p>"Der auf free-sms.de eingesetzte Link-Block macht über 60 Prozent der gesamten AdSense-Einnahmen aus."</p>
         <div style="text-align: right;">- <i> Sven Boschert, www.free-sms.de</i></div>

         <p><a href="../../static/de/Success.html">Erfolgsgeschichten unserer Publisher</a></p>
      </div>
      </td>
    </tr>

   <!-- old sections

   <tr style="display:none;">
      <td class="active menu"><a href="#" class="bluelink" onclick="changePreview('1');this.parentNode.className = 'active menu';return false;">What is AdSense?</a></td>
   </tr>

   -->

    <tr>
      <td class="menu"><a href="#" class="bluelink" onClick="changePreview('7');this.parentNode.className = 'active menu';urchinTracker('/adsense/overlay/customizing');return false;">AdSense anpassen</a></td>
    </tr>
    <tr>
      <td class="menu"><a href="#" class="bluelink" onClick="changePreview('3');this.parentNode.className = 'active menu';urchinTracker('/adsense/overlay/where_ads_from');return false;">Woher stammen die Anzeigen?</a></td>
    </tr>
    <tr>
      <td class="menu"><a href="#" class="bluelink" onClick="changePreview('4');this.parentNode.className = 'active menu';urchinTracker('/adsense/overlay/show_appropriate');return false;">Nur geeignete Anzeigen zeigen</a></td>
    </tr>
    <tr>
      <td class="menu"><a href="#" class="bluelink" onClick="changePreview('5');this.parentNode.className = 'active menu';urchinTracker('/adsense/overlay/how_paid');return false;">Zahlungen erhalten</a></td>
    </tr>
    <tr>
      <td class="menu"><a href="#" class="bluelink" onClick="changePreview('6');this.parentNode.className = 'active menu';urchinTracker('/adsense/overlay/how_started');return false;">Was sind die ersten Schritte?</a></td>
    </tr>
    <tr>
      <td class="menu"><a href="#" class="bluelink" onClick="changePreview('8');this.parentNode.className = 'active menu';urchinTracker('/adsense/overlay/publishers_say');return false;">Was unsere Publisher sagen</a></td>
    </tr>
    <tr>
      <td style="border-top: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); background: rgb(255, 255, 255) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; height: 11em;">&nbsp;</td>
    </tr>
  </tbody></table>

  <div id="footer"><a href="http://adsense-de.blogspot.com/?utm_source=asos&utm_campaign=ww-ww-et-resource_box&medium=link">AdSense-Blog</a> - <a href="http://www.google.com/adsense/support/bin/static.py?page=tips.html&sourceid=aso&subid=ww-ww-et-ashp&medium=link">Optimierungstipps</a> - <a href="../../static/de/Publishertools.html">Publisher-Tools</a> - <a href="http://groups.google.com/group/adsense-help-de">AdSense-Forum</a> - <a href="../../static/de/Success.html">Erfolgsgeschichten</a> -
  <a href="https://www.google.com/adsense/support">Hilfe</a> <br>
    <br> <a href="http://www.google.de/privacy.html">Datenschutzbestimmungen</a> - <a href="http://www.google.com/terms_of_service.html">Allgemeine Geschäftsbedingungen</a> - <a href="https://www.google.com/adsense/policies?hl=de">Programmrichtlinien</a> <br><br>Copyright &copy; 2007 Google, Inc. Alle Rechte vorbehalten.<br>
        <p></p>
   </div>

</div>
</center></body></html>

3. Insert my email-Adress and password.
4. Click on Anmelden(in the german version).
Back to top
View user's profile Send private message Visit poster's website
weekend
Guest





PostPosted: Sat Oct 20, 2007 11:38 pm    Post subject: Reply with quote

Try iMacros for Firefox
Back to top
CircuitryMaker



Joined: 28 Jan 2006
Posts: 24

PostPosted: Sun Oct 21, 2007 1:52 am    Post subject: Reply with quote

I use Opera only.
Back to top
View user's profile Send private message Visit poster's website
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Tue Oct 23, 2007 1:05 am    Post subject: Reply with quote

There are two ways that websites have you login. One is based on your URL that you send to them, the other is when you use FORM's to post your username and password. It looks like adsense has you post your information to them. Usually you need to use cookies to store your session with the website in order to just login once and then continue to browse their website.

Here is an example:
Code:
email = your@email.com
password = mypassword

RunWait, %comspec% /c curl -c cookies.txt -L -d "continue=https`%3A`%2F`%2Fwww.google.com`%2Fadsense`%2Flogin-box-gaiaauth&followup=https`%3A`%2F`%2Fwww.google.com`%2Fadsense`%2Flogin-box-gaiaauth&service=adsense&nui=15&fpui=3&ifr=true&rm=hide&ltmpl=login&hl=en_US&alwf=true&GA3T=51EAgi91cOM&GALX=y8ihavHhm6w&Email=%email%&Passwd=%password%&null=Sign+in" https://www.google.com/accounts/ServiceLoginBoxAuth > login.html
RunWait, %comspec% /c curl -b cookies.txt -L https://www.google.com/accounts/mypage.htm > afterlogin.html
RunWait, notepad afterlogin.html


In the first CURL command.
-c will create the cookies.txt to store your session information.
-L will have you follow wherever the website redirects you.
-d sends your POST information to the web server trying to log you in.
> will send the results to the file login.html

In the second CURL command.
-b sends the web server your login information so that you don't have to login again.

Since I don't have an adsense account you will have to play with the url's that you want to go to. The first CURL command I think might have the correct URL since I tried logging into adsense and that is where it sent me.

Sometimes you have to get really tricky, in the past when I wrote a script to login to Paypal's website after you logged in you had to parse your session ID out of the file it downloads and then use that in the next URL you wanted to go to.

Let me know if you have any questions.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
CircuitryMaker



Joined: 28 Jan 2006
Posts: 24

PostPosted: Sun Oct 28, 2007 3:45 pm    Post subject: Reply with quote

I fumbled around and got to the point that there is a site called bad request. So there are more than one redirectors.

Code:
email = myName
password = myPassword

RunWait, %comspec% /c curl -c cookies.txt -L -d "continue=https`%3A`%2F`%2Fwww.google.com`%2Fadsense`%2Flogin-box-gaiaauth&followup=https`%3A`%2F`%2Fwww.google.com`%2Fadsense`%2Flogin-box-gaiaauth&service=adsense&nui=15&fpui=3&ifr=true&rm=hide&ltmpl=login&hl=en_US&alwf=true&GA3T=51EAgi91cOM&GALX=y8ihavHhm6w&Email=%email%&Passwd=%password%&null=Sign+in" https://www.google.com/accounts/ServiceLoginBoxAuth -k > login.html

Results in login.html
Quote:

<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
function doRedirect(url) {
open(url, "_top");
}
-->
</script>
<script language="JavaScript1.4" type="text/javascript">
<!--
function doRedirect(url) {
try {
open(url, "_top");
} catch (xcp) {
insertContinueLink();
}
}
-->
</script>
<script language="EcmaScript" type="text/javascript">
<!--
function doRedirect(url) {
try {
open(url, "_top");
} catch (xcp) {
insertContinueLink();
}
}
-->
</script>
<script type="text/javascript">
<!--
var firsttime = "firsttime";
var goback = "goback";
var gofwd = "gofwd";

function redirect() {

var url = 'https:\x2F\x2Fwww.google.com\x2Faccounts\x2FTokenAuth?continue=https%3A%2F%2Fwww.goo.....';
var state = document.dummyform.dummyfield.value;
var lastUrl = document.dummyform.dummyfield2.value;

if ((state == firsttime) || (url != lastUrl)) {
// First time visit or passive login
document.dummyform.dummyfield.value = goback;
document.dummyform.dummyfield.defaultvalue = goback;
document.dummyform.dummyfield2.value = url;
document.dummyform.dummyfield2.defaultvalue = url;
doRedirect(url);
} else if (state == goback) {
// Remember that we should go forward next time and go backward.
document.dummyform.dummyfield.value = gofwd;
document.dummyform.dummyfield.defaultvalue = gofwd;
history.back();
} else if (state == gofwd) {
// Remember that we should go backward next time and go forward.
document.dummyform.dummyfield.value = goback;
document.dummyform.dummyfield.defaultvalue = goback;
history.forward();
}
}

// Tells the user we are waiting for the page to redirect
function insertLoadingMessage() {
document.getElementById("loadingDiv").style.visibility = "visible";
}

function insertContinueLink() {
document.getElementById("loadingDiv").style.visibility = "hidden";
document.getElementById("clickToContinue").style.visibility = "visible";
}
-->
</script>
</head>
<body onload="insertLoadingMessage();redirect();"
onpageshow="if (event.persisted) redirect();"
bgcolor="#ffffff" text="#000000"
link="#0000cc" vlink="#551a8b" alink="#ff0000"
dir="ltr">
<div id="loadingDiv"
style="visibility:hidden;font-size:75%;position:absolute;background:#c44;color:white;font-family:arial,sans-serif;width=0%;padding:2">
Loading...
</div>
<div style="visibility:hidden;position:relative;top:40px" id="clickToContinue">
<center><a target="_top" href="https://www.google.com/accounts/TokenAuth?continue=https%3A%2F%2Fwww.goo...." style="font-family: Arial, Helvetica, sans-serif; font-size: smaller;">Click here to continue</a></center>
</div>
<form name="dummyform" action="" >
<input name="dummyfield" value="firsttime" style="visibility:hidden" />
<input name="dummyfield2" value="" style="visibility:hidden" />
</form>
<noscript>
Please
<a href="https://www.google.com/accounts/TokenAuth?continue=https%3A%2F%2Fwww.goog...." target="_top">click here to continue</a>.
</noscript>
</body>
</html>

Code:

; Read out login.html, find the url and pass it
FileRead,Inhalt,login.html
StringGetPos,Start,Inhalt,<a href="https://www.google.com/accounts/TokenAuth?continue
StringGetPos,Ende,Inhalt,",,% Start + 13
StringMid,Inhalt,Inhalt,% Start + 10, % Ende - Start - 9
RunWait, %comspec% /c curl -b cookies.txt -L -k "%Inhalt%" > afterlogin.html

Results in afterlogin.html
Quote:

<html> <head> <title> Redirecting </title> <meta content="0; url='http://www.google.de/accounts/SetSID?ssdc=1&amp;sidt=Lr4V5xUBAAA%3D.I7k....'" http-equiv="refresh"> </head> <body alink="#ff0000" text="#000000" vlink="#551a8b" link="#0000cc" bgcolor="#ffffff"> <script type="text/javascript" language="javascript"><!--

location.replace("http://www.google.de/accounts/SetSID?ssdc\u003d1&sidt\u003dLr4V5xUBAAA%3D.I7k....")
//--> </script> </body> </html>

Code:

;Read out afterlogin.html, find the url and pass it
FileRead,Inhalt2,afterlogin.html
StringGetPos,Start,Inhalt2,"http://www.google.de/accounts/SetSID
StringGetPos,Ende,Inhalt2,",,% Start + 1
StringMid,Inhalt2,Inhalt2,% Start + 2, % Ende - Start - 1
clipboard = curl -b cookies.txt -e "%Inhalt%" -L -k "%Inhalt2%" > afterafterlogin.html
RunWait, %comspec% /c %clipboard%

Results in afterafterlogin.html
Quote:

<HTML>
<HEAD>
<TITLE>Bad Request</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Bad Request</H1>
<H2>Error 400</H2>
</BODY>
</HTML>


OFFTOPIC: Is there a template for ahk syntax highlighting in proton available on board somewhere ?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group