boss上hr甩过来一个github链接,让我熟悉一下,但是面试定的是第二天……
时间不等人,赶紧配置一下环境,再想办法注册ins,跑跑代码验证是否安装成功
再看看文档,翻译一下,于是乎有了这份方法文档
泰裤啦,要会js逆向、要会浏览器嵌入、要会H5,还说什么多线程、代理池、抓包都是初级操作。
这么说工资很高喽?一问正式工资四千,上面都会才五千,有三四年经验就六千……
再看岗位名称,初级python工程师,再看需求,高级python全栈工程师,你礼貌吗?你礼貌吗!!
浪费我6块钱的地铁交通费,浪费我4块钱的打印费用,浪费我3个小时的时间。
这公司就是依托答辩。
未润色完毕,也可能缺少了几个方法
Method | Return | Description | 描述 |
---|---|---|---|
media_id(media_pk: int) | str | Return media_id by media_pk (e.g. 2277033926878261772 -> 2277033926878261772_1903424587) | 按media_pk返回media_id(例如2277033926878261772->22770339268 78261772_1903424587) |
media_pk(media_id: str) | int | Return media_pk by media_id (e.g. 2277033926878261772_1903424587 -> 2277033926878261772) | 按media_id返回media_pk(例如2277033926878261772_1903424587->22770339268 78261772) |
media_pk_from_code(code: str) | int | Return media_pk | 返回媒体_pk |
media_pk_from_url(url: str) | int | Return media_pk | 返回媒体_pk |
user_medias(user_id: int, amount: int = 20) | List[Media] | Get list of medias by user_id | 按user_id获取媒体列表 |
user_medias_paginated(user_id: int, amount: int = 0, end_cursor: str = “”) | Tuple[List[Media], str] | Get one page of medias by user_id | 通过user_id获取一页媒体 |
user_clips(user_id: int, amount: int = 50) | List[Media] | Get list of clips (reels) by user_id | 按user_id获取剪辑(卷轴)列表 |
usertag_medias(user_id: int, amount: int = 20) | List[Media] | Get medias where a user is tagged | 获取标记用户的媒体 |
media_info(media_pk: int) | Media | Return media info | 返回媒体信息 |
media_delete(media_pk: int) | bool | Delete media | 删除媒体 |
media_edit(media_pk: int, caption: str, title: str, usertags: List[Usertag], location: Location) | dict | Change caption for media | 更改媒体标题 |
media_user(media_pk: int) | User | Get user info for media | 获取媒体的用户信息 |
media_oembed(url: str) | MediaOembed | Return short media info by media URL | 按媒体URL返回短媒体信息 |
media_like(media_id: str) | bool | Like media | 喜欢媒体 |
media_unlike(media_id: str) | bool | Unlike media | 与媒体不同 |
media_seen(media_ids: List[str], skipped_media_ids: List[str]) | bool | Mark a media as seen | 将媒体标记为已看到 |
media_likers(media_id: str) | List[UserShort] | Return list of users who liked this post (due to Instagram limitations, this may not return a complete list) | 返回喜欢此帖子的用户列表(由于Instagram的限制,这可能不会返回完整的列表) |
media_archive(media_id: str) | bool | Archive a media | 存档媒体 |
media_unarchive(media_id: str) | bool | Unarchive a media | 取消存档媒体 |
media_pin(media_id: str) | bool | Pin a media to user profile | 将媒体固定到用户配置文件 |
media_unpin(media_id: str) | bool | Unpin a media to user profile | 取消固定媒体到用户配置文件 |
Method | Return | Description | 描述 |
---|---|---|---|
account_info() | Account | Get private info for your account (e.g. email, phone_number) | 获取您帐户的私人信息(例如电子邮件、电话号码) |
account_edit(email: str, phone_number: str, username: str, full_name: str, biography: str, external_url: str) | Account | Change profile data | 更改配置文件数据 |
account_change_picture(path: Path) | UserShort | Change Profile picture | 更改个人资料图片 |
send_confirm_email(email: str) | dict | Send confirmation code to new email address | 将确认码发送到新的电子邮件地址 |
send_confirm_phone_number(phone_number: str) | dict | Send confirmation code to new phone number | 向新电话号码发送确认码 |
Method | Return | Description | 描述 |
---|---|---|---|
user_followers(user_id: int, amount: int = 0) | Dict[int, UserShort] | Get dict of followers users (amount=0 - fetch all followers) | 获取关注者用户的dict(数量=0-获取所有关注者) |
user_following(user_id: int, amount: int = 0) | Dict[int, UserShort] | Get dict of following users (amount=0 - fetch all) | 获取以下用户的dict(数量=0-获取全部) |
search_followers(user_id: int, query: str) | List[UserShort] | Search by followers | 按关注者搜索 |
search_following(user_id: int, query: str) | List[UserShort] | Search by following | 按以下内容搜索 |
user_info(user_id: int) | User | Get user info | 获取用户信息 |
user_info_by_username(username: str) | User | Get user info by username | 按用户名获取用户信息 |
user_follow(user_id: int) | bool | Follow user | 关注用户 |
user_unfollow(user_id: int) | bool | Unfollow user | 不允许用户 |
user_id_from_username(username: str) | int | Get user_id by username | 按用户名获取user_id |
username_from_user_id(user_id: int) | str | Get username by user_id | 通过user_id获取用户名 |
user_remove_follower(user_id: int) | bool | Remove your follower | 移除你的追随者 |
mute_posts_from_follow(user_id: int) | bool | Mute posts from following user | 将以下用户的帖子静音 |
unmute_posts_from_follow(user_id: int) | bool | Unmute posts from following user | 取消对以下用户的帖子的静音 |
mute_stories_from_follow(user_id: int) | bool | Mute stories from following user | 将以下用户的故事静音 |
enable_posts_notifications(user_id: int) | bool | Enable post notifications of user | 启用用户的发布通知 |
disable_posts_notifications(user_id: int) | bool | Disable post notifications of user | 禁用用户的发布通知 |
enable_videos_notifications(user_id: int) | bool | Enable videos notifications of user | 启用用户的视频通知 |
disable_videos_notifications(user_id: int) | bool | Disable videos notifications of user | 禁用用户的视频通知 |
enable_reels_notifications(user_id: int) | bool | Enable reels notifications of user | 启用用户的卷轴通知 |
disable_reels_notifications(user_id: int) | bool | Disable reels notifications of user | 禁用用户的卷轴通知 |
enable_stories_notifications(user_id: int) | bool | Enable stories notifications of user | 启用用户的故事通知 |
disable_stories_notifications(user_id: int) | bool | Disable stories notifications of user | 禁用用户的故事通知 |
close_friend_add(user_id: int) | bool | Add to Close Friends List | 添加到好友列表 |
close_friend_remove(user_id: int) | bool | Remove from Close Friends List | 从好友列表中删除 |
Method | Return | Description | 描述 |
---|---|---|---|
location_search(lat: float, lng: float) | List[Location] | Search Location by GEO coordinates | 通过GEO坐标搜索位置 |
location_complete(location: Location) | Location | Complete blank fields | 填写空白字段 |
location_build(location: Location) | String | Serialized JSON | 序列化JSON |
location_info(location_pk: int) | Location | Return Location info (pk, name, address, lng, lat, external_id, external_id_source) | 返回位置信息(pk、名称、地址、lng、lat、external_id、external_id_source) |
location_medias_top(location_pk: int, amount: int = 9) | List[Media] | Return Top posts by Location | 按位置返回热点 |
location_medias_recent(location_pk: int, amount: int = 24) | List[Media] | Return Most recent posts by Location | 按位置返回最近的帖子 |
fbsearch_places(query: str, lat: float = 40.74, lng: float = -73.94) | List[Location] | >Search places via Facebook Search (40.74/-73.94 - New York, default GEO) | >通过Facebook搜索搜索地点(40.74/73.94-纽约,默认GEO) |
Method | Return | Description | 描述 |
---|---|---|---|
hashtag_info(name: str) | Hashtag | Return Hashtag info (id, name, picture) | 返回哈希标签信息(id,name,picture) |
hashtag_related_hashtags(name: str) | List[Hashtag] | Return list of related Hashtag | 返回相关Hashtag的列表 |
hashtag_medias_top(name: str, amount: int = 9) | List[Media] | Return Top posts by Hashtag | 按哈希标签返回热门帖子 |
hashtag_medias_recent(name: str, amount: int = 27) | List[Media] | Return Most recent posts by Hashtag | 按哈希标签返回最近的帖子 |
Method | Return | Description | 描述 |
---|---|---|---|
collections() | List[Collection] | Get all account collections | 获取所有帐户集合 |
collection_pk_by_name(name: str) | int | Get collection_pk by name | 按名称获取collection_pk |
collection_medias_by_name(name: str) | List[Media] | Get medias in collection by name | 按名称获取集合中的媒体 |
collection_medias(collection_pk: int, amount: int = 21, last_media_pk: int = 0) | List[Media] | Get medias in collection by collection_id; Use amount=0 to return all medias in collection; Use last_media_pk to return medias by cursor | 通过collection_id获取收藏中的媒体;使用amount=0返回集合中的所有媒体;使用last_media_pk通过光标返回媒体 |
liked_medias(amount: int = 21, last_media_pk: int = 0) | List[Media] | Get media you have liked | 获取您喜欢的媒体 |
media_save(media_id: str, collection_pk: int = None) | bool | Save media to collection | 将媒体保存到收藏 |
media_unsave(media_id: str, collection_pk: int = None) | bool | Unsave media from collection | 取消保存集合中的媒体 |
Method | Return | Description | 描述 |
---|---|---|---|
media_comment(media_id: str, text: str, replied_to_comment_id: Optional[int] = None) | Comment | Add new comment to media | 向媒体添加新评论 |
media_comments(media_id: str, amount: int = 0) | List[Comment] | Get a list comments for media (amount=0 - all comments) | 获取媒体的列表评论(数量=0-所有评论) |
media_comments_chunk(media_id: str, max_amount: int, min_id: str = None) | Tuple[List[Comment], str] | Get chunk of comments on a media and end_cursor | 获取媒体和end_cursor上的大量评论 |
comment_like(comment_pk: int) | bool | Like a comment | 点赞评论 |
comment_unlike(comment_pk: int) | bool | Unlike a comment | 与评论不同 |
comment_pin(media_id: str,comment_pk: int) | bool | Pin a comment | 固定评论 |
comment_unpin(media_id: str,comment_pk: int) | bool | Unpin a comment | 取消固定评论 |
comment_bulk_delete(media_id: str, comment_pks: List[int]) | bool | Delete a comment | 删除评论 |
Method | Return | Description | 描述 |
---|---|---|---|
highlight_pk_from_url(url: str) | int | Get Highlight PK from URL | 从URL获取突出显示PK |
highlight_info(highlight_pk: int) | Highlight | Get Highlight by pk or id | 通过pk或id获取高亮显示 |
user_highlights(user_id: int, amount: int = 0) | List[Highlight] | Get a user’s highlights | 获取用户的精彩内容 |
highlight_create(title: str, story_ids: List[str], cover_story_id: str = “”, crop_rect: List[float] = [0.0, 0.21830457, 1.0, 0.78094524]) | Highlight | Create highlight | 创建高亮显示 |
highlight_change_title(highlight_pk: str, title: str) | Highlight | Change title for highlight | 更改突出显示的标题 |
highlight_change_cover(highlight_pk: str, cover_path: Path) | Highlight | Change cover for highlight | 更换突出显示的封面 |
highlight_add_stories(highlight_pk: str, added_media_ids: List[str]) | Highlight | Add stories to highlight | 添加要突出显示的故事 |
highlight_remove_stories(highlight_pk: str, removed_media_ids: List[str]) | Highlight | Remove stories from highlight | 从突出显示中删除故事 |
highlight_delete(highlight_pk: str) | bool | Delete highlight | 删除突出显示 |
Method | Return | Description | 描述 |
---|---|---|---|
user_stories(user_id: int, amount: int = None) | List[Story] | Get list of stories by user_id | 按user_id获取故事列表 |
story_info(story_pk: int, use_cache: bool = True) | Story | Return story info | 返回故事信息 |
story_delete(story_pk: int) | bool | Delete story | 删除报道 |
story_seen(story_pks: List[int], skipped_story_pks: List[int]) | bool | Mark a story as seen | 将故事标记为已看到 |
story_pk_from_url(url: str) | int | Get Story (media) PK from URL | 从URL获取故事(媒体)PK |
story_download(story_pk: int, filename: str = “”, folder: Path = “”) | Path | Download story media by media_type | 按媒体类型下载故事媒体 |
story_download_by_url(url: str, filename: str = “”, folder: Path = “”) | Path | Download story media using URL to file (mp4 or jpg) | 使用URL下载故事媒体到文件(mp4或jpg) |
story_viewers(story_pk: int, amount: int = 20) | List[UserShort] | List of story viewers (via Private API) | 故事观众列表(通过私有API) |
story_like(story_id: str, revert: bool = False) | bool | Like a story | 就像一个故事 |
story_unlike(story_id: str) | bool | Unlike a story | 不像一个故事 |
photo_upload_to_story(path: Path, caption: str, upload_id: str, mentions: List[Usertag], locations: List[StoryLocation], links: List[StoryLink], hashtags: List[StoryHashtag], stickers: List[StorySticker], extra_data: Dict[str, str] = {}) | Story | Upload photo (Support JPG files) | 上传照片(支持JPG文件) |
video_upload_to_story(path: Path, caption: str, thumbnail: Path, mentions: List[Usertag], locations: List[StoryLocation], links: List[StoryLink], hashtags: List[StoryHashtag], stickers: List[StorySticker], extra_data: Dict[str, str] = {}) | Story | Upload video (Support MP4 files) | 上传视频(支持MP4文件) |
StoryBuilder.build_clip(clip: moviepy.Clip, max_duration: int = 0) | StoryBuild | Build CompositeVideoClip with background and mentioned users. Return MP4 file and mentions with coordinates | 使用背景和提到的用户构建CompositeVideoClip。返回MP4文件并提及坐标 |
StoryBuilder.video(max_duration: int = 0) | StoryBuild | Call build_clip(VideoClip, max_duration) | 调用build_clip(视频剪辑,最大持续时间) |
StoryBuilder.photo(max_duration: int = 0) | StoryBuild | Call build_clip(ImageClip, max_duration) | 调用build_clip(图像剪辑,最大持续时间) |
Method | Return | Description | 描述 |
---|---|---|---|
direct_threads(amount: int = 20, selected_filter: str = “”, thread_message_limit: Optional[int] = None) | List[DirectThread] | Get all threads from inbox | 从收件箱获取所有线程 |
Note: selected_filter = “”, “flagged” or “unread” | 从挂起的收件箱中获取所有线程 | ||
direct_pending_inbox(amount: int = 20) | List[DirectThread] | Get all threads from pending inbox | 获取包含消息的线程 |
direct_thread(thread_id: int, amount: int = 20) | DirectThread | Get Thread with Messages | 仅获取线程中的消息 |
direct_messages(thread_id: int, amount: int = 20) | List[DirectMessage] | Get only Messages in Thread | 将消息添加到现有线程 |
direct_answer(thread_id: int, text: str) | DirectMessage | Add Message to exist Thread | 向用户或线程发送消息 |
direct_send(text: str, user_ids: List[int] = [], thread_ids: List[int] = []) | DirectMessage | Send Message to Users or Threads | 搜索线程(例如,按用户名) |
direct_search(query: str) | List[DirectShortThread] | Search threads (for example by username) | 按user_id获取线程 |
direct_thread_by_participants(user_ids: List[int]) | DirectThread | Get thread by user_id | 删除(称为“隐藏”) |
direct_thread_hide(thread_id: int) | bool | Delete (called “hide”) | 与用户列表共享媒体 |
direct_media_share(media_id: str, user_ids: List[int]) | DirectMessage | Share a media to list of users | 将故事分享给用户列表 |
direct_story_share(story_id: str, user_ids: List[int], thread_ids: List[int]) | DirectMessage | Share a story to list of users | 与用户列表共享用户配置文件 |
direct_profile_share(user_id: str, user_ids: List[int], thread_ids: List[int]) | DirectMessage | Share a user profile to list of users | 将线程标记为未读 |
direct_thread_mark_unread(thread_id: int) | bool | Mark a thread as unread | 从线程中删除消息 |
direct_message_delete(thread_id: int, message_id: int) | bool | Delete a message from thread | 将线程静音 |
direct_thread_mute(thread_id: int, revert: bool = False) | bool | Mute the thread | 取消线程静音 |
direct_thread_unmute(thread_id: int) | bool | Unmute the thread | 将线程的视频通话静音 |
direct_thread_mute_video_call(thread_id: int, revert: bool = False) | bool | Mute video call for the thread | 取消对线程的视频调用的静音 |
direct_thread_unmute_video_call(thread_id: int) | bool | Unmute video call for the thread | 将直接照片发送到用户或线程列表 |
direct_send_photo(path: Path, user_ids: List[int], thread_ids: List[int]) | DirectMessage | Send a direct photo to list of users or threads | 向用户或线程列表发送直接视频 |
direct_send_video(path: Path, user_ids: List[int], thread_ids: List[int]) | DirectMessage | Send a direct video to list of users or threads | 将视频作为故事上传到直接线程并进行配置 |
video_upload_to_direct(path: Path, caption: str, thumbnail: Path, mentions: List[StoryMention], thread_ids: List[int] = [], extra_data: Dict[str, str] = {}) | DirectMessage | Upload video to direct thread as a story and configure it | 将视频作为故事上传到直接线程并进行配置 |
Method | Return | Description | 描述 |
---|---|---|---|
insights_media_feed_all(post_type: str = “ALL”, time_frame: str = “TWO_YEARS”, data_ordering: str = “REACH_COUNT”, count: int = 0, sleep: int = 2) | List[Dict] | Return medias with insights | 返回有见解的媒体 |
insights_account() | Dict | Get statistics by your account | 按您的帐户获取统计信息 |
insights_media(media_pk: int) | Dict | Get statistics by your media | 通过媒体获取统计数据 |
Method | Return | Description | 描述 |
---|---|---|---|
track_info_by_canonical_id(music_canonical_id: str) | Track | Get Track by music_canonical_id | 按music_canonical_id获取曲目 |
track_download_by_url(url: str, filename: str = “”, folder: Path = “”) | Path | Download track by URL | 按URL下载曲目 |
search_music(query: str) | List[Track] | Return list of tracks | 返回曲目列表 |