title: Why does the Wikipedia API Call in Python throw up a Type Error?
body: <p>I'm trying to get all the past revisions (edits) on a certain Wikipedia article using the MediaWIki API. This code should retrieve all the edits made on the FDR Wikipedia page. Here is the code that I wrote in order to do this:</p>
  
  <pre><code>import re
  import requests
  
  def GetRevisions():
      url = "https://en.wikipedia.org/w/api.php?action=query=Franklin%20Delano%20Roosevelt=revisions&amp;rvlimit=500&amp;titles=" 
  
      while True:
          joan = requests.get(url)
          revisions = []                                        
          revisions += re.findall('&lt;continue rvcontinue="([^"]+)"',joan)
  
          cont = re.search('&lt;continue rvcontinue="([^"]+)"',joan)
          if not cont:
              break
      return revisions
  </code></pre>
  
  <p>The problem that I keep running into is this error:
     <code>TypeError: expected string or buffer</code>  `
  I'm not sure why this error keeps on showing up.
  Can anyone please give guidance on how to remedy this?</p>