The InstaPage
moduleο
- class InstaTweet.instapage.InstaPage(data, client=None)[source]View on GitHubο
Bases:
ABC
Abstract wrapper class for wrapping API responses from Instagram pages
- __init__(data, client=None)[source]View on GitHubο
Initialize an
InstaPage
Used 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
InstaClient
to 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
InstaPost
objects
- get_more_posts()[source]View on GitHubο
Requests the next page of posts from the
InstaPage
If the page
has_more_posts
, theyβll be added to theposts
list- Returns
True
if the request was successful, otherwiseFalse
- Return type
- property has_more_posts: boolο
Returns
True
if 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:
InstaPage
API 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
InstaClient
to use
- class InstaTweet.instapage.Hashtag(data, client=None)[source]View on GitHubο
Bases:
InstaPage
API 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
InstaClient
to use