title: Python: How to get data from chunks of file over xml-rpc
body: <p>I am creating a software for downloading movie subtitles using OpenSubtitle API in Python.</p>
  
  <p>The API implements XML-RPC protocol. According to <a href="http://trac.opensubtitles.org/projects/opensubtitles/wiki/XMLRPC#DownloadSubtitles" rel="nofollow">API documentation</a>, to download a subtitle from site database, the following method is used:</p>
  
  <pre><code>array DownloadSubtitles( $token, array($IDSubtitleFile, $IDSubtitleFile,...) )
  </code></pre>
  
  <p>Its output is:</p>
  
  <pre><code>[data] =&gt; Array
      (
          [0] =&gt; Array
              (
                  [idsubtitlefile] =&gt; 10
                  [data] =&gt; MQ0KMDA6MDA6MzgsMzAwIC0tPiAwMDowMDo0MSwwMDA...
              )
          [1] =&gt; Array
              (
                  [idsubtitlefile] =&gt; 20
                  [data] =&gt; MQ0KMDA6MDA6MjYsMjgzIC0tPiAwMD...
              )
  </code></pre>
  
  <p>Where [idsubtitlefile] is subtitle_id and [data] is subtitle byte in base64 and gzip form.</p>
  
  <p>The problems I am facing is, whenever I download a subtitle:</p>
  
  <pre><code>idsubtitlefile='513de0ea27d63b9d631d769a492d72dc'
  token='a1t49trievitmjda4ija7dif44'
  xmlrpclib.DownloadSubtitles(token,[(idsubtitlefile)] )
  </code></pre>
  
  <p>I get a result like this:</p>
  
  <pre><code>[{'data': 'H4sIAAAAAAAAAwMAAAAAAAAAAAA=',\      
     'idsubtitlefile':'513de0ea27d63b9d631d769a492d72dc'}] 
  </code></pre>
  
  <p>Here, the <code>data</code> value is supposed to be base64 encoded binary subtitle data, but how can so little data be the subtitle.</p>
  
  <p>I think somehow the data has to be download from server in chunks, or perhaps I am missing something.</p>