I'm using they python requests library for the first time, and I am confused. When I run the function below in a for loop, with different base URLs, it appears to receive a response, but the content that is returned is the same for both URLs.
If I look at the API URL in my browser, then I see that it's the content for the first URL that's being returned both times. What am I missing?
base_urls = ['http://kaweki.wikia.com/','http://solarmovie.wikia.com/']
def getEdits(wikiObj, limit=500):
payload = {'limit': limit}
r = requests.get('{}api/v1/Activity/LatestActivity'.format(wikiObj),
params=payload)
edits = r.json()
return edits['items']
for url in base_urls:
print getEdits(url)