Jump to content
Sign in to follow this  
tobject

Download stops at 64 files?

Recommended Posts

tobject

I'm trying to get all Jim Cramer's followers but for some reason my download stops at 64 files

Is that Twitter limitation or AutoIt?

#include <array.au3>

Func DownloadXML()
$next_cursor=-1;
$MyXMLLinkIni="http://api.twitter.com/1/statuses/followers/JimJCramer.xml?cursor=<CURSOR>";

$indx1=1;

while 1



   $sFileName=String($indx1);
   ;MsgBox(0,"dsdsds",$sFileName &" index:"&$indx1);
   if StringLen($indx1)<3 Then
       for $Indx2=1 to 3- StringLen($indx1)
           $sFileName="0"&$sFileName;
       next;
   endif;

    $sFileName="Followers"&$sFileName&".xml";
    $MyXMLLink=StringReplace($MyXMLLinkIni,"<CURSOR>",String($next_cursor));
   $hDownload=InetGet($MyXMLLink, $sFileName, 1, 1)

Do
    Sleep(250)
Until InetGetInfo($hDownload, 2)

   ; Get next $next_cursor
    If FileExists($sFileName) Then
        $DataFile = FileOpen($sFileName, 0)
        $sDawRata=FileRead($DataFile);
        FileClose($DataFile);
        $iPos=StringInStr($sDawRata,"<next_cursor>");
        $NextCurRaw=StringMid($sDawRata,$iPos,500);
         ;MsgBox(0,"sdsdsd",$NextCurRaw);
        $iPos=StringInStr($NextCurRaw,"</next_cursor>");
        $NextCurRaw=StringLeft($NextCurRaw,$iPos-1);
        $NextCurRaw=StringReplace($NextCurRaw,"<next_cursor>","");
        $next_cursor=$NextCurRaw;
    endif;

$indx1=$indx1+1;

if $next_cursor="0" or $next_cursor="" then ExitLoop;
wend;
EndFunc

DownloadXML();
MsgBox(0,"Finished","Followers Download is done!",5);

Share this post


Link to post
Share on other sites
BrettF

Hi tobject,

From what I can see it would be either;

  • A limitation of your script
  • A limitation of the user specifically

It shouldn't be twitter until about 3200 which is their limit. More likely you have made a mistake somewhere in your script.

Cheers,

Brett

Share this post


Link to post
Share on other sites
tobject

Looks like something weird with InetGet

if my CPU is working hard InetGet drops some files and even stops

I just Explorer/Copy some files during InetGet and got bunch of missed files in downloads

I don't think I use timeout?!

Edited by tobject

Share this post


Link to post
Share on other sites
tobject

Now it went to 813 but was a skip between 112 and 813

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.