The InstaPage moduleο
- class InstaTweet.instapage.InstaPage(data, client=None)[source]View on GitHubο
Bases:
ABCAbstract wrapper class for wrapping API responses from Instagram pages
- __init__(data, client=None)[source]View on GitHubο
Initialize an
InstaPageUsed to wrap responses from endpoints that contain Instagram post data, like Instagram user profiles and Instagram hashtag searches
- Parameters
data (Dict) β the API response JSON to use as source data
client (Optional[InstaClient]) β the
InstaClientto use; required forget_more_posts()
- property posts: List[InstaPost]ο
Posts that have been scraped from the Instagram page
To retrieve the next page of posts, call
get_more_posts()- Returns
the pageβs posts as
InstaPostobjects
- get_more_posts()[source]View on GitHubο
Requests the next page of posts from the
InstaPageIf the page
has_more_posts, theyβll be added to thepostslist- Returns
Trueif the request was successful, otherwiseFalse- Return type
- property has_more_posts: boolο
Returns
Trueif more posts can be scraped usingget_more_posts()
- property end_cursor: strο
Cursor used in request by
get_more_posts()
- class InstaTweet.instapage.InstaUser(data, client=None)[source]View on GitHubο
Bases:
InstaPageAPI response wrapper for an Instagram userβs profile
- __init__(data, client=None)[source]View on GitHubο
Initialize an
InstaUser- Parameters
data (Dict) β the API response from
get_user()client (Optional[InstaClient]) β the
InstaClientto use
- class InstaTweet.instapage.Hashtag(data, client=None)[source]View on GitHubο
Bases:
InstaPageAPI response wrapper for an Instagram hashtag
- __init__(data, client=None)[source]View on GitHubο
Initialize a
Hashtag- Parameters
data (Dict) β the API response from
get_hashtag()client (Optional[InstaClient]) β the
InstaClientto use