title: Improve speed of wikipedia.search with Python
body: <p>I have a dictionary of famous people's names sorted by their initials. I want to convert these names into their respective Wikipedia title page names. These are the same for the first three given in this example, but Alexander Bell gets correctly converted to Alexander Graham Bell after running this code. </p>
  
  <p>The algorithm works, although took about an hour to do all the 'AA' names and I am hoping for it to do this all the way up to 'ZZ'.</p>
  
  <p>Is there any optimisation I can do on this? For example I saw something about batch requests but am not sure if it applies to my algorithm. </p>
  
  <p>Or is there a more efficient method that I could use to get this same information?</p>
  
  <p>Thanks.</p>
  
  <pre><code>import wikipedia
  
  PeopleDictionary = {'AA':['Amy Adams', 'Aaron Allston'], 'AB':['Alia Bhatt', 'Alexander Bell']}
  
  for key, val in PeopleDictionary.items():
  for val in range(len(PeopleDictionary[key])):
      Name_URL_All = wikipedia.search(PeopleDictionary[key][val])
      if Name_URL_All:
          Name_URL = Name_URL_All[0]
          PeopleDictionary[key][val] = Name_URL
  </code></pre>