forked from tmhlsky/Instagram-API-python
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
Latest commit
11 lines (9 loc) · 454 Bytes
/
Copy pathtest.py
File metadata and controls
11 lines (9 loc) · 454 Bytes
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
# -*- coding: utf-8 -*-
fromInstagramAPIimportInstagramAPI
InstagramAPI=InstagramAPI("login", "password")
InstagramAPI.login() # login
InstagramAPI.tagFeed("cat") # get media list by tag #cat
media_id=InstagramAPI.LastJson# last response JSON
InstagramAPI.like(media_id["ranked_items"][0]["pk"]) # like first media
InstagramAPI.getUserFollowers(media_id["ranked_items"][0]["user"]["pk"]) # get first media owner followers