igdownloader / InstagramDownloader

Firefox and Chrome Extention which creates an download button for instagram images and videos and videos
https://huiibuh.github.io/InstagramDownloader/
801 stars 152 forks source link

can't download #162

Closed mugwump64 closed 3 years ago

mugwump64 commented 3 years ago

i've been using downloader for a while now, but it has stopped working. i hit the button to download an image and nothing happens. i've tried reloading the page, removing then re-adding the extension, but nothing has helped.

i know nothing about coding but when i opened the console it showed this:

Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 (index):1 The resource https://www.instagram.com/graphql/query/?query_hash=f5a8dac6e9669788b06e27318b4fda50&variables=%7B%22only_stories%22%3Atrue%2C%22stories_prefetch%22%3Atrue%2C%22stories_video_dash_manifest%22%3Afalse%7D was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally. www.instagram.com/:1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

HuiiBuh commented 3 years ago

Interesting. Normally my extension should notify you if there is an error.

HuiiBuh commented 3 years ago

I need some more information like resolution, os, browser, addon version and most importantly. What image/video where you trying to download. A link to the image would be nice, so i can have a look at it

mugwump64 commented 3 years ago

i am using chrome browser. windows 10 version20h2

the addon version is 4.3.0

it happens with any image. i was using the downloader it downloaded the image just fine when i tried to download another image, nothing.

HuiiBuh commented 3 years ago

Ok i will have a look.

HuiiBuh commented 3 years ago

Do you have any errors in thr browser console? Press F12

wzx1000 commented 3 years ago

Screen Shot 2021-04-15 at 12 59 29 PM i'm having the same problem, i can only download stories but not posts. this appears in the inspect window. i'm using chrome Version 89.0.4389.128

jollino commented 3 years ago

I have a similar, but somewhat different problem. When trying to download a story from someone who included me as a close friend (i.e. green circle), the download fails and the console shows this: image Regular stories and posts work as expected, and all stories worked until the latest update. Using the latest Chrome on Mac.

HuiiBuh commented 3 years ago

@wzx1000 Did you try to download a lot of images at once or does this happen every time you try to download even a single image?

@jollino Currently stories from close friends are not supported, because I dont use instagram and therefore cannot test them. If you want to support this feature you could take a look at the querySelectors in Variables.ts, and try to find oit which selector should be used for story image. Otherwise you can try to execute these commands and send me the result

// Image
document.querySelector(".y-yJ5")

// Close button
document.querySelector(".K_10X").innerHTML

// Get the content of the most of the page
document.querySelector(".Igw0E").innerHTML
jollino commented 3 years ago

@jollino Currently stories from close friends are not supported, because I dont use instagram and therefore cannot test them. If you want to support this feature you could take a look at the querySelectors in Variables.ts, and try to find oit which selector should be used for story image.

Oh my bad, I thought it was actually working before but I must have gotten a few things mixed up. :-)

Otherwise you can try to execute these commands and send me the result

// Image document.querySelector(".y-yJ5")

<img class="y-yJ5 " crossorigin="anonymous" decoding="sync" sizes="420.65625px" srcset="https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-15/e35/173435610_…D353&_nc_sid=276363&ig_cache_key=MjU1MzE5OTIxNTExOTc0ODMzNw%3D%3D.2-ccb7-4 828w, https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-15/sh0.08/e35/p6…420B&_nc_sid=276363&ig_cache_key=MjU1MzE5OTIxNTExOTc0ODMzNw%3D%3D.2-ccb7-4 640w, https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-15/e35/p480x480/…086B&_nc_sid=276363&ig_cache_key=MjU1MzE5OTIxNTExOTc0ODMzNw%3D%3D.2-ccb7-4 480w, https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-15/e35/p320x320/…2269&_nc_sid=276363&ig_cache_key=MjU1MzE5OTIxNTExOTc0ODMzNw%3D%3D.2-ccb7-4 320w, https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-15/e35/p240x240/…37B8&_nc_sid=276363&ig_cache_key=MjU1MzE5OTIxNTExOTc0ODMzNw%3D%3D.2-ccb7-4 240w" src="https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-15/e35/c0.322.828…23FB&_nc_sid=276363&ig_cache_key=MjU1MzE5OTIxNTExOTc0ODMzNw%3D%3D.2-ccb7-4">

// Close button document.querySelector(".K_10X").innerHTML

"<button class="wpO6b " type="button"><div class="QBdPU "><svg aria-label="Close" class="_8-yf5 " fill="#ffffff" height="24" viewBox="0 0 48 48" width="24"><path clip-rule="evenodd" d="M41.8 9.8L27.5 24l14.2 14.2c.6.6.6 1.5 0 2.1l-1.4 1.4c-.6.6-1.5.6-2.1 0L24 27.5 9.8 41.8c-.6.6-1.5.6-2.1 0l-1.4-1.4c-.6-.6-.6-1.5 0-2.1L20.5 24 6.2 9.8c-.6-.6-.6-1.5 0-2.1l1.4-1.4c.6-.6 1.5-.6 2.1 0L24 20.5 38.3 6.2c.6-.6 1.5-.6 2.1 0l1.4 1.4c.6.6.6 1.6 0 2.2z" fill-rule="evenodd"></path></svg></div></button><span class="story-download-button"></span>"

// Get the content of the most of the page document.querySelector(".Igw0E").innerHTML

"<div style="height: 747.84px; width: 420.66px;"><section class="szopg"><div class="Cd8X1"><button class="_53lex"><div class="coreSpriteLeftChevron"></div></button><div class="_-6eR1"><div class="JkC_e _6UUwD"><div class="qbCDp" style="width: 420.656px; height: 747.833px;"><img class="y-yJ5 " crossorigin="anonymous" decoding="sync" sizes="420.65625px" srcset="https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-15/e35/173435610_1991487487670829_5320104081121597502_n.jpg?tp=1&amp;_nc_ht=instagram.ffco3-1.fna.fbcdn.net&amp;_nc_cat=109&amp;_nc_ohc=oay59SjrGQMAX9LkbMn&amp;edm=ANmP7GQAAAAA&amp;ccb=7-4&amp;oh=a756f664cd6882e37c202d6f554f5e73&amp;oe=607BD353&amp;_nc_sid=276363&amp;ig_cache_key=MjU1MzE5OTIxNTExOTc0ODMzNw%3D%3D.2-ccb7-4 828w,https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-15/sh0.08/e35/p640x640/173435610_1991487487670829_5320104081121597502_n.jpg?tp=1&amp;_nc_ht=instagram.ffco3-1.fna.fbcdn.net&amp;_nc_cat=109&amp;_nc_ohc=oay59SjrGQMAX9LkbMn&amp;edm=ANmP7GQAAAAA&amp;ccb=7-4&amp;oh=3b7e2ad070f8946a0c2ff83aa9ff035f&amp;oe=607C420B&amp;_nc_sid=276363&amp;ig_cache_key=MjU1MzE5OTIxNTExOTc0ODMzNw%3D%3D.2-ccb7-4 640w,https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-15/e35/p480x480/173435610_1991487487670829_5320104081121597502_n.jpg?tp=1&amp;_nc_ht=instagram.ffco3-1.fna.fbcdn.net&amp;_nc_cat=109&amp;_nc_ohc=oay59SjrGQMAX9LkbMn&amp;edm=ANmP7GQAAAAA&amp;ccb=7-4&amp;oh=c5533acb47f9a008083e600fb4433381&amp;oe=607C086B&amp;_nc_sid=276363&amp;ig_cache_key=MjU1MzE5OTIxNTExOTc0ODMzNw%3D%3D.2-ccb7-4 480w,https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-15/e35/p320x320/173435610_1991487487670829_5320104081121597502_n.jpg?tp=1&amp;_nc_ht=instagram.ffco3-1.fna.fbcdn.net&amp;_nc_cat=109&amp;_nc_ohc=oay59SjrGQMAX9LkbMn&amp;edm=ANmP7GQAAAAA&amp;ccb=7-4&amp;oh=f8dc7fded0d9348a82fd56949f193205&amp;oe=607C2269&amp;_nc_sid=276363&amp;ig_cache_key=MjU1MzE5OTIxNTExOTc0ODMzNw%3D%3D.2-ccb7-4 320w,https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-15/e35/p240x240/173435610_1991487487670829_5320104081121597502_n.jpg?tp=1&amp;_nc_ht=instagram.ffco3-1.fna.fbcdn.net&amp;_nc_cat=109&amp;_nc_ohc=oay59SjrGQMAX9LkbMn&amp;edm=ANmP7GQAAAAA&amp;ccb=7-4&amp;oh=4056b3a7f551e0d3a9a2aac6a8036d40&amp;oe=607C37B8&amp;_nc_sid=276363&amp;ig_cache_key=MjU1MzE5OTIxNTExOTc0ODMzNw%3D%3D.2-ccb7-4 240w" src="https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-15/e35/c0.322.828.828a/173435610_1991487487670829_5320104081121597502_n.jpg?tp=1&amp;_nc_ht=instagram.ffco3-1.fna.fbcdn.net&amp;_nc_cat=109&amp;_nc_ohc=oay59SjrGQMAX9LkbMn&amp;edm=ANmP7GQAAAAA&amp;ccb=7-4&amp;oh=2584067ce8f4ff7fc99f9fb92193e8ba&amp;oe=607C23FB&amp;_nc_sid=276363&amp;ig_cache_key=MjU1MzE5OTIxNTExOTc0ODMzNw%3D%3D.2-ccb7-4"><div class=" Igw0E rBNOH YBx95 _4EzTm i0EQd O1flK D8xaz TxciK yiMZG" style="height: 100%;"><div class="z6Odz"><div class="B20bj" role="dialog"></div><div class="yxA_V " role="button" tabindex="0" style="width: 420.656px; height: 747.833px;"></div></div></div></div></div></div><div class="vgS-T"></div><header class="C1rPk"><div class="_6ZEdQ"><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa " style="width: 100%;"></div></div><div class="_7zQEa"><div class="-Nmqg"></div><div class="XcATa doB_t" style="width: 54%;"></div></div></div><div class=" Igw0E rBNOH CcYR1 ybXk5 _4EzTm "><div class="B7GUE"><div class="_295C2"><a class="_OVxx _2dbep qNELH kIKUG" href="/jollino.it/" tabindex="0" style="width: 32px; height: 32px;"><img alt="jollino.it's profile picture" class="_6q-tv" crossorigin="anonymous" data-testid="user-avatar" draggable="false" src="https://instagram.ffco3-1.fna.fbcdn.net/v/t51.2885-19/s150x150/115819371_212937440036815_7463727845706850051_n.jpg?tp=1&amp;_nc_ht=instagram.ffco3-1.fna.fbcdn.net&amp;_nc_ohc=ilX7AA5TimkAX_ScEZ4&amp;edm=ABfd0MgAAAAA&amp;ccb=7-4&amp;oh=01ba413358bdc7652de20764f5dba361&amp;oe=60A013A9&amp;_nc_sid=7bff83"></a><div class=" Igw0E _56XdI eGOV_ _4EzTm soMvl "><div class=" Igw0E _56XdI eGOV_ ybXk5 _4EzTm "><div class="Rkqev _4k_hf"><a class="FPmhX notranslate _1PU_r" title="jollino.it" href="/jollino.it/" tabindex="0">jollino.it</a></div><time class="BPyeS Nzb55" datetime="2021-04-16T14:58:05.000Z" title="Apr 16, 2021">4m</time></div></div></div></div><div class="_8p8kF"><div class=" Igw0E rBNOH YBx95 ybXk5 _4EzTm "><button class="sqdOP yWX7d y3zKF " type="button"><div class="Hmdt0"><div class=" Igw0E IwRSH eGOV_ _4EzTm lC6p0 HVWg4 " style="height: 100%; width: 100%;"><div class="_7UhW9 PIoXz qyrsm h_zdq uL8Hv ">CLOSE FRIENDS</div></div></div></button><div class=" Igw0E IwRSH eGOV_ _4EzTm JI_ht "></div></div><button class="wpO6b " type="button"><div class="QBdPU "><svg aria-label="Pause" class="_8-yf5 " fill="#ffffff" height="16" viewBox="0 0 48 48" width="16"><path d="M15 1c-3.3 0-6 1.3-6 3v40c0 1.7 2.7 3 6 3s6-1.3 6-3V4c0-1.7-2.7-3-6-3zm18 0c-3.3 0-6 1.3-6 3v40c0 1.7 2.7 3 6 3s6-1.3 6-3V4c0-1.7-2.7-3-6-3z"></path></svg></div></button><span tabindex="0" class=""><svg aria-label="Video has no audio." class="_8-yf5 " fill="#ffffff" height="16" viewBox="0 0 48 48" width="16"><path clip-rule="evenodd" d="M42.9 24l4.6 4.6c.6.6.6 1.6 0 2.2l-1.4 1.4c-.6.6-1.6.6-2.2 0l-4.6-4.6-4.6 4.6c-.6.6-1.6.6-2.2 0l-1.4-1.4c-.6-.6-.6-1.6 0-2.2l4.6-4.6-4.6-4.6c-.6-.6-.6-1.6 0-2.2l1.4-1.4c.6-.6 1.6-.6 2.2 0l4.6 4.6 4.6-4.6c.6-.6 1.6-.6 2.2 0l1.4 1.4c.6.6.6 1.6 0 2.2L42.9 24zM24.1 47.6L11.3 34.7H1.6C.7 34.7 0 34 0 33.2V14.8c0-.8.7-1.5 1.5-1.5h9.7L24.1.4c.9-.9 2.5-.3 2.5 1v45.1c0 1.3-1.6 2-2.5 1.1z" fill-rule="evenodd"></path></svg><button class="FqZhB" label="Toggle audio">Toggle audio</button></span><button class="dCJp8 afkep"><span aria-label="Menu" class="glyphsSpriteMore_horizontal__filled__24__grey_0 u-__7"></span></button></div></div></header><button class="FhutL"><div class="coreSpriteRightChevron"></div></button><div class="yI_Tx MNN6b"><div class="D638T"><div class=" Igw0E IwRSH eGOV_ ybXk5 _4EzTm "><div class="Sux9m _6DGE9"><div class=" Igw0E IwRSH eGOV_ vwCYk ItkAi "><textarea class="Xuckn" placeholder="Reply to jollino.it..." style="height: 18px !important;"></textarea></div></div><div class="bVyqj"><div aria-disabled="false" role="button" tabindex="0"><button class="dCJp8 afkep"><span aria-label="Direct" class="glyphsSpriteDirect__outline__24__grey_0 u-__7"></span></button></div></div></div></div></div></div></section></div>"

(No worries about the urls: these are all from a a close-friends story I posted on an account of mine, as "seen" from another account of mine. :-) )

mugwump64 commented 3 years ago

Do you have any errors in thr browser console? Press F12

The resource https://www.instagram.com/graphql/query/?query_hash=f5a8dac6e9669788b06e27318b4fda50&variables=%7B%22only_stories%22%3Atrue%2C%22stories_prefetch%22%3Atrue%2C%22stories_video_dash_manifest%22%3Afalse%7D was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally. (index):1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 (index):1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 (index):1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 (index):1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 (index):1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

and:

The resource https://www.instagram.com/graphql/query/?query_hash=f5a8dac6e9669788b06e27318b4fda50&variables=%7B%22only_stories%22%3Atrue%2C%22stories_prefetch%22%3Atrue%2C%22stories_video_dash_manifest%22%3Afalse%7D was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally. (index):1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 scontent-iad3-1.cdninstagram.com/v/t50.2886-16/175683268_294625348904145_3811532941855779968_n.mp4?_nc_ht=scontent-iad3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=Zc7MZxE3bfMAX_Dpoys&edm=AIQHJ4wAAAAA&ccb=7-4&oh=d08e99731a8315fe0ed9bd0dea821972&oe=6080780C&_nc_sid=7b02f1&bytestart=839291&byteend=1379435:1 Failed to load resource: net::ERR_QUIC_PROTOCOL_ERROR (index):1 Uncaught (in promise) TypeError: network error (index):1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 9b50daeb9ae1.js:32 Uncaught (in promise) OZ_SOURCE_BUFFER: Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null. at o (https://www.instagram.com/static/bundles/es6/oz-player.main.js/9b50daeb9ae1.js:32:2945) at m.exports.$SourceBufferManager16 (https://www.instagram.com/static/bundles/es6/oz-player.main.js/9b50daeb9ae1.js:32:3740) at https://www.instagram.com/static/bundles/es6/oz-player.main.js/9b50daeb9ae1.js:32:6193 (index):1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 (index):1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

Wulgaren commented 3 years ago

tried to download all pics from a profile yesterday, it didnt work and now i can't download anything

Uncaught (in promise) TypeError: Cannot read property 'shortcode_media' of undefined at extension.js:1 at Generator.next () at i (extension.js:1) (anonymous) @ extension.js:1 i @ extension.js:1 Promise.then (async) l @ extension.js:1 (anonymous) @ extension.js:1 t @ extension.js:1 downloadContent @ extension.js:1

HuiiBuh commented 3 years ago

@jollino @Wulgaren Thanks. I will have a look

HuiiBuh commented 3 years ago

@mugwump64 Can you send me the result you see if you visit this url?

https://www.instagram.com/p/CNdPgvghkpJ/?__a=1

Wulgaren commented 3 years ago

the plugin started working for me, i think i got banned for a longer time because of the download all option, cause i can't like anything now lol, sorry for the trouble!

HuiiBuh commented 3 years ago

This could be the case. I will close the issue for now. If any other person has a problem please send me the result you see if you visit the url.

https://www.instagram.com/p/CNdPgvghkpJ/?__a=1