The InstaPost
classο
- class InstaTweet.instapost.InstaPost(post_data)[source]View on GitHubο
Bases:
object
Minimalistic API response wrapper for an Instagram post
- __init__(post_data)[source]View on GitHubο
Initialize an
InstaPost
- idο
The post id
- is_videoο
Indicates if the post is a video or photo
- filepathο
str
: Path of downloaded media, set bydownload_post()
- tweet_dataο
dict
: Limited data from a successful tweet based off this post, set bysend_tweet()
- property media_url: strο
The direct URL to the actual post content
- Returns
the
video_url
if the post is a video, otherwise thethumbnail_url
- property filename: strο
Concatenates
id
+filetype
to create the default filename, for use when saving the post- For Example::
>> print(post.filename) β2868062811604347946.mp4β
- add_tweet_data(tweet)[source]View on GitHubο
Used by
TweetClient
to add minimal tweet data after the post has been tweeted