Jump to content

Download stops at 64 files?


Recommended Posts

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);
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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