How to get attached link from sticker within stories
See original GitHub issueHi,
I’m trying so badly to get an attached link from a sticker within a story, but I can’t get it. I tried to find into the autogenerated doc the way to do it, but after a couple of hours of searching I may try to ask some helps here.
From this story (link and image below), I want to get the link from the “ulta.com” sticker.
Here the story Image from story
What I tried to do so:
const stories = await req.ig.feed.userStory(510784943);
const medias = await stories.items();
Here’s the result of medias
(only the first image, I don’t need the rest):
[{
"taken_at": 1631629890,
"pk": "2662626998895019899",
"id": "2662626998895019899_510784943",
"device_timestamp": 163162989066040,
"media_type": 2,
"code": "CTzjSX2gId7",
"client_cache_key": "MjY2MjYyNjk5ODg5NTAxOTg5OQ==.2",
"filter_type": 0,
"is_unified_video": false,
"user": {
"pk": 510784943,
"username": "firstaidbeauty",
"full_name": "First Aid Beauty",
"is_private": false,
"profile_pic_url": "https://scontent-cdg2-1.cdninstagram.com/v/t51.2885-19/s150x150/145143832_3449273145185065_5840977807385692050_n.jpg?_nc_ht=scontent-cdg2-1.cdninstagram.com&_nc_ohc=Cr2s4FZHTMsAX-t14jM&edm=ALCvFkgBAAAA&ccb=7-4&oh=bcfb7a498ea0a7a511fb022e871b7101&oe=614903B4&_nc_sid=643ae9",
"profile_pic_id": "2500437778560731265_510784943",
"is_verified": true,
"follow_friction_type": 0,
"has_anonymous_profile_picture": false,
"is_unpublished": false,
"is_favorite": false,
"account_badges": []
},
"caption_is_edited": false,
"like_and_view_counts_disabled": false,
"is_commercial": true,
"commerciality_status": "commercial",
"is_paid_partnership": false,
"playlist_eligibility": false,
"image_versions2": {
"candidates": [
{
"width": 360,
"height": 640,
"url": "https://scontent-cdg2-1.cdninstagram.com/v/t51.2885-15/e15/p360x360/241976100_468373050791039_856052970583523738_n.jpg?_nc_ht=scontent-cdg2-1.cdninstagram.com&_nc_cat=111&_nc_ohc=1J84_7b8xbkAX9vAvxW&edm=ALCvFkgBAAAA&ccb=7-4&oh=35f6097f2dc4d7e61fda640dedb58000&oe=6144452B&_nc_sid=643ae9&ig_cache_key=MjY2MjYyNjk5ODg5NTAxOTg5OQ%3D%3D.2-ccb7-4",
"scans_profile": "e15",
"estimated_scans_sizes": [
3275,
6550,
9826,
13101,
16377,
19717,
569001,
29479,
29479
]
}
]
},
"original_width": 640,
"original_height": 1137,
"caption_position": 0,
"is_reel_media": true,
"photo_of_you": false,
"can_see_insights_as_brand": false,
"is_dash_eligible": 1,
"video_dash_manifest": "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\" minBufferTime=\"PT1.500S\" type=\"static\" mediaPresentationDuration=\"PT0H0M15.020S\" maxSegmentDuration=\"PT0H0M4.000S\" profiles=\"urn:mpeg:dash:profile:isoff-on-demand:2011,http://dashif.org/guidelines/dash264\">\n <Period duration=\"PT0H0M15.020S\">\n <AdaptationSet segmentAlignment=\"true\" maxWidth=\"720\" maxHeight=\"1280\" maxFrameRate=\"30\" par=\"720:1280\" lang=\"und\" subsegmentAlignment=\"true\" subsegmentStartsWithSAP=\"1\">\n <Representation id=\"371558494588745vd\" mimeType=\"video/mp4\" codecs=\"avc1.64001F\" width=\"720\" height=\"1280\" frameRate=\"30\" sar=\"1:1\" startWithSAP=\"1\" bandwidth=\"274571\" FBQualityClass=\"hd\" FBQualityLabel=\"720w\" FBPlaybackResolutionMos=\"0:100.00,360:97.53,480:97.10,720:91.20,1080:82.50\">\n <BaseURL>https://scontent-cdt1-1.cdninstagram.com/v/t72.14836-16/76371639_209681674480733_7278104985966766002_n.mp4?_nc_ht=scontent-cdt1-1.cdninstagram.com&_nc_cat=105&_nc_ohc=oXRMFTwwt68AX-8XdEn&edm=ALCvFkgBAAAA&ccb=7-4&oh=2d971fe98591b871b577851feea7c73e&oe=6144318D&_nc_sid=643ae9</BaseURL>\n <SegmentBase indexRangeExact=\"true\" indexRange=\"849-940\" FBFirstSegmentRange=\"941-89625\" FBSecondSegmentRange=\"89626-181992\" FBPrefetchSegmentRange=\"941-181992\">\n <Initialization range=\"0-848\"/>\n </SegmentBase>\n </Representation>\n <Representation id=\"1601300173534636v\" mimeType=\"video/mp4\" codecs=\"avc1.64001F\" width=\"720\" height=\"1280\" frameRate=\"30\" sar=\"1:1\" startWithSAP=\"1\" bandwidth=\"152803\" FBQualityClass=\"hd\" FBQualityLabel=\"720w\" FBPlaybackResolutionMos=\"0:100.00,360:95.96,480:94.71,720:87.50,1080:77.03\">\n <BaseURL>https://scontent-cdt1-1.cdninstagram.com/v/t72.14836-16/76044915_960533634524885_700551232855120330_n.mp4?_nc_ht=scontent-cdt1-1.cdninstagram.com&_nc_cat=105&_nc_ohc=XbgRFGbImTYAX9ePlFQ&edm=ALCvFkgBAAAA&ccb=7-4&oh=677165cea433378f2c339dae36808689&oe=61443D09&_nc_sid=643ae9</BaseURL>\n <SegmentBase indexRangeExact=\"true\" indexRange=\"849-940\" FBFirstSegmentRange=\"941-44172\" FBSecondSegmentRange=\"44173-96618\" FBPrefetchSegmentRange=\"941-96618\">\n <Initialization range=\"0-848\"/>\n </SegmentBase>\n </Representation>\n </AdaptationSet>\n <AdaptationSet segmentAlignment=\"true\" lang=\"und\" subsegmentAlignment=\"true\" subsegmentStartsWithSAP=\"1\">\n <Representation id=\"931336640795421ad\" mimeType=\"audio/mp4\" codecs=\"mp4a.40.5\" audioSamplingRate=\"44100\" startWithSAP=\"1\" bandwidth=\"5686\">\n <AudioChannelConfiguration schemeIdUri=\"urn:mpeg:dash:23003:3:audio_channel_configuration:2011\" value=\"2\"/>\n <BaseURL>https://scontent-cdt1-1.cdninstagram.com/v/t50.12441-16/242166084_886660255313187_5688449706536644002_n.mp4?_nc_ht=scontent-cdt1-1.cdninstagram.com&_nc_cat=103&_nc_ohc=hLEzpiGeCDgAX_HdL7x&edm=ALCvFkgBAAAA&ccb=7-4&oh=9e54289b308479a621e9c3b469e9a1eb&oe=6143C531&_nc_sid=643ae9</BaseURL>\n <SegmentBase indexRangeExact=\"true\" indexRange=\"787-914\" FBFirstSegmentRange=\"915-2186\" FBSecondSegmentRange=\"2187-3452\" FBPrefetchSegmentRange=\"915-3452\">\n <Initialization range=\"0-786\"/>\n </SegmentBase>\n </Representation>\n </AdaptationSet>\n </Period>\n</MPD>",
"video_codec": "avc1.64001F",
"number_of_qualities": 2,
"video_versions": [
{
"type": 101,
"width": 720,
"height": 1280,
"url": "https://scontent-cdg2-1.cdninstagram.com/v/t50.12441-16/241801621_654842498828003_3665663958170264620_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeS5iYXNlbGluZSJ9&_nc_ht=scontent-cdg2-1.cdninstagram.com&_nc_cat=111&_nc_ohc=-hrMFXvwclMAX9VLB_J&edm=ALCvFkgBAAAA&vs=217812083707900_231041339&_nc_vs=HBksFQAYJEdKV1phUTdqeG9abWsxTUNBQ3prc016eURkOHlicGt3QUFBRhUAAsgBABUAGCRHRVFwYnc0ajdZMnRhU1lEQUtLdHlwRGVidkZPYnBrd0FBQUYVAgLIAQAoABgAGwGIB3VzZV9vaWwBMRUAACbI546vkNzpPxUCKAJDMywXQC4AAAAAAAAYEmRhc2hfYmFzZWxpbmVfMl92MREAdegHAA%3D%3D&_nc_rid=5e167422af&ccb=7-4&oe=61443128&oh=a47cfae6923b589be5f23e8e9017cc66&_nc_sid=643ae9&_nc_vts_prog=1",
"id": "217812083707900v"
},
{
"type": 102,
"width": 720,
"height": 1280,
"url": "https://scontent-cdg2-1.cdninstagram.com/v/t50.12441-16/242083620_1174524579724907_8720540102387107799_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeS5iYXNlbGluZSJ9&_nc_ht=scontent-cdg2-1.cdninstagram.com&_nc_cat=111&_nc_ohc=0grYZ_25AcYAX-f8M6I&edm=ALCvFkgBAAAA&vs=313756203843797_1168873975&_nc_vs=HBksFQAYJEdDVG5iUTVydmxwUU9Td0VBTmNIVlF3RmxRVjVicGt3QUFBRhUAAsgBABUAGCRHRVFwYnc0ajdZMnRhU1lEQUtLdHlwRGVidkZPYnBrd0FBQUYVAgLIAQAoABgAGwGIB3VzZV9vaWwBMRUAACbI546vkNzpPxUCKAJDMywXQC4AAAAAAAAYEmRhc2hfYmFzZWxpbmVfMV92MREAdegHAA%3D%3D&_nc_rid=5e167422af&ccb=7-4&oe=61446C1A&oh=bbf0c1e99c2bf5c75d22d2b384708a28&_nc_sid=643ae9&_nc_vts_prog=1",
"id": "313756203843797v"
},
{
"type": 103,
"width": 720,
"height": 1280,
"url": "https://scontent-cdg2-1.cdninstagram.com/v/t50.12441-16/242083620_1174524579724907_8720540102387107799_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeS5iYXNlbGluZSJ9&_nc_ht=scontent-cdg2-1.cdninstagram.com&_nc_cat=111&_nc_ohc=0grYZ_25AcYAX-f8M6I&edm=ALCvFkgBAAAA&vs=313756203843797_1168873975&_nc_vs=HBksFQAYJEdDVG5iUTVydmxwUU9Td0VBTmNIVlF3RmxRVjVicGt3QUFBRhUAAsgBABUAGCRHRVFwYnc0ajdZMnRhU1lEQUtLdHlwRGVidkZPYnBrd0FBQUYVAgLIAQAoABgAGwGIB3VzZV9vaWwBMRUAACbI546vkNzpPxUCKAJDMywXQC4AAAAAAAAYEmRhc2hfYmFzZWxpbmVfMV92MREAdegHAA%3D%3D&_nc_rid=5e167422af&ccb=7-4&oe=61446C1A&oh=bbf0c1e99c2bf5c75d22d2b384708a28&_nc_sid=643ae9&_nc_vts_prog=1",
"id": "313756203843797v"
}
],
"has_audio": true,
"video_duration": 15.069,
"caption": null,
"can_viewer_save": false,
"organic_tracking_token": "eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiNWUxNjc0YjFjMDk1NDQyMTg0MWM4MGIyZjQ0ZjcyOTkyNjYyNjI2OTk4ODk1MDE5ODk5Iiwic2VydmVyX3Rva2VuIjoiMTYzMTcwMTcyNTMwM3wyNjYyNjI2OTk4ODk1MDE5ODk5fDcxNzY0Nzl8NDI1MTgzNzA1MmI0NDkyNmMzM2VmMzRkMTI4NTlkYWE2NGZhZjJmMDIxZTA2NTA2NDdkNWQxM2M1N2ZjYzdlMCJ9LCJzaWduYXR1cmUiOiIifQ==",
"expiring_at": 1631716290,
"imported_taken_at": 1631199768,
"sharing_friction_info": {
"should_have_sharing_friction": false,
"bloks_app_url": null
},
"product_type": "story",
"is_in_profile_grid": false,
"profile_grid_control_enabled": false,
"deleted_reason": 0,
"integrity_review_decision": "pending",
"can_reshare": true,
"can_reply": true,
"reel_mentions": [
{
"x": "1.2604315806343749",
"y": "0.6346453518379921",
"z": 1,
"width": "0.29367167975895303",
"height": "0.052168712608826",
"rotation": 0,
"is_pinned": 0,
"is_hidden": 0,
"display_type": "mention_username",
"is_sticker": 0,
"is_fb_sticker": 0,
"user": {
"pk": 22841482,
"username": "ultabeauty",
"full_name": "Ulta Beauty",
"is_private": false,
"profile_pic_url": "https://scontent-cdg2-1.cdninstagram.com/v/t51.2885-19/s150x150/11373941_460046967508794_1845757504_a.jpg?_nc_ht=scontent-cdg2-1.cdninstagram.com&_nc_ohc=9T8xswb5QUEAX9b_1Zw&edm=ALCvFkgBAAAA&ccb=7-4&oh=32b5ab14e3d8d36f0d39649da6ac33a7&oe=6149B09A&_nc_sid=643ae9",
"is_verified": true,
"follow_friction_type": -1
}
}
],
"story_static_models": [],
"supports_reel_reactions": true,
"can_send_custom_emojis": false,
"show_one_tap_fb_share_tooltip": true
},
...
]
As you can see, there’s no trace of the link within the story. The closest thing I get is the mention to “ultrabeauty”. I’m probably doing it wrong. Any help would be appreciated, many thanks!
PS: The link I should get is https://l.instagram.com/?u=https%3A%2F%2Fwww.ulta.com%2Fp%2Fface-cleanser-xlsImpprod13491007&e=ATNVr5DuzqhJ23kqJAxLSIZd-f7PP_yoFo51PvOWldZHCLs627Dyxd3tYx9Qwi0CJzSQKTLQx0BvxHkWXT-Yawc&s=1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7
Top GitHub Comments
Hi @adyassine, nope I didn’t have time to figure it out, I had to move on another project.
From the response of the api call, I can see that there is an attribute called story_link_stickers. Does anyone know how to get this attribute coming through the library?