ohld / igbot

🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
https://hikerapi.com/p/N2P6iqiM
Apache License 2.0
4.72k stars 1.47k forks source link

update get_link_from_media_id() #1144

Closed negswell closed 4 years ago

negswell commented 4 years ago
ohld commented 4 years ago

Great contribution! Please fix all Travis-CI codestyle issues and I'll merge it!

bruvv commented 4 years ago

This is indeed a bug and i will try and fix this soon. @ohld can you close this because of my PR: https://github.com/instagrambot/instabot/pull/1193

untitled3000 commented 4 years ago

@negswell I'm getting the media_id by calling this function - get_media_id_from_link()

By inferring that the variable is a string, your change broke my code. Just FYI

bruvv commented 4 years ago

What code did you use?

untitled3000 commented 4 years ago

Basically, I created a submit form that takes in an instagram link. I process the link and convert it to a media_id via get_media_id_from_link(). I then pass the media_id to a function that returns several attributes of the post. In this function, I also return the instagram link via get_link_from_media_id() (I know it's redundant, but it should still work).

When I printed out the error, i got - 'int' object has no attribute 'find'

I reverted the get_link_from_media_id() function to before this update, which solved my problem.

bruvv commented 4 years ago

That's weird since the media is should always be a int object. Can you post your script as an issue and include the precise error message ? Inc the link too that your using. Than I'll debug the code.

untitled3000 commented 4 years ago

Sounds good. I'll strip the code out and post when I have some extra time.