I'm trying to automate some Instagram posts with instagrapi, which is the only tool I've found that supports album uploads. The documentation officially has the following example:
>>> media = cl.photo_upload(
"/app/image.jpg",
"Test caption for photo with #hashtags and mention users such @example",
usertags=[Usertag(user=example, x=0.5, y=0.5)],
location=Location(name='Russia, Saint-Petersburg', lat=59.96, lng=30.29)
However, I get an error with the following code:
bot.album_upload(paths='temp/',
caption=text,
location=Location(name='Amsterdam, Netherlands'))
The error is:
NameError: name 'Location' is not defined
I've tried just doing
bot.album_upload(paths=album,
caption=text,
location='Amsterdam, Netherlands')
but then I get
AttributeError: 'str' object has no attribute 'external_id'
What am I doing incorrectly? TIA, I'm very new to this library.