Reputation: 843
Im trying to create a query to collect all images from instagram api with refference to media search.Here is my code in Python
from instagram.client import InstagramAPI
api = InstagramAPI(access_token = 'YOUR ACCESS TOKEN')
result, __pagination_url = api.media_search(q="query", count=20, lat=54.1, lng="35.2", min_timestamp="2013-03-01 15:28:02", max_timestamp ="2013-04-01 15:28:02")
However i keep on receiving this error:
ValueError: too many values to unpack (expected 2)
Can someone please explain to me how to solve this , ive tried to solve this issue but no results yet, also i want to print out all the links that the data retrieves.
Thank you
Upvotes: 0
Views: 116
Reputation: 11906
The query returns one value, so use this:
result = api.media_search(q="query", count=20, lat=54.1, lng="35.2", min_timestamp="2013-03-01 15:28:02", max_timestamp ="2013-04-01 15:28:02")
Your code tried to take two and failed.
Upvotes: 1