You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
frominstagram_scraper.instagramimportInstagramScraperinstagram=InstagramScraper()
# get medias page by page, out of loopmedia_paginate=instagram.get_paginate_medias('shaq')
media_paginate2=instagram.get_paginate_medias('shaq', media_paginate['max_id'])
print(media_paginate['meidas'], media_paginate['max_id'])
print(media_paginate2['meidas'], media_paginate2['max_id'])
# this method need to loginfrominstagram_scraper.instagramimportInstagramScraperinstagram=InstagramScraper()
instagram.with_credentials('your account', 'your password')
res=instagram.login()
medias_from_feed=instagram.get_medias_from_feed('shaq', 56)
print(medias_from_feed[0].get_link())
print(len(medias_from_feed))
get_stories
# this method need to login, get the stories of logged in accountfrominstagram_scraper.instagramimportInstagramScraperinstagram=InstagramScraper()
instagram.with_credentials('your account', 'your password')
res=instagram.login()
stories=instagram.get_stories()
print(stories[0].get_stories())
print(len(stories))
get_following
# this method need to loginfrominstagram_scraper.instagramimportInstagramScraperinstagram=InstagramScraper()
instagram.with_credentials('your account', 'your password')
res=instagram.login()
account=instagram.get_account('shaq')
following=instagram.get_following(account.get_id())
print(following[0]['id'])
frominstagram_scraper.instagramimportInstagramScraperinstagram=InstagramScraper()
# these methods need to logininstagram.with_credentials('your account', 'your password')
res=instagram.login()
medias=instagram.get_medias('luengwaiban', 10)
media_id=medias[1].get_id()
instagram.like(media_id)
# unlike the same postinstagram.unlike(media_id)
add_comment
frominstagram_scraper.instagramimportInstagramScraperinstagram=InstagramScraper()
instagram.with_credentials('your account', 'your password')
res=instagram.login()
medias=instagram.get_medias('luengwaiban', 10)
media_id=medias[0].get_id()
# add a commentcomment=instagram.add_comment(media_id, 'this is comment 2')
print(comment)
# # replied a commentcomment2=instagram.add_comment(media_id, 'this is comment 3 to reply comment 2', comment)