Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {"INSTAGRAM_pub_api_a1-p":{"link":"^(?:(?:i\\.)?instagr(?:\\.am|am\\.com))\\/(?:[\\w.]+\\/)?(tv\\/|p\\/|reel\\/){1,2}([^\\/?#]+).*","ci":1,"url":": (()=>{var disable_on_timestamps = false ; if(disable_on_timestamps&&(this.node.className===\"x1i10hfl xjbqb8w x6umtig x1b1mbwd xaqea5y xav7gou x9f619 x1ypdohk xt0psk2 xe8uvvx xdj266r x11i5rnm xat24cr x1mh8g0r xexx8yu x4uap5 x18d9i69 xkhd6sd x16tdsg8 x1hl2dhg xggy1nq x1a2a7pz _a9zg _a6hd\"|this.node.nodeName==='TIME'||this.node.nodeName==='SPAN'))throw new Error('Not used on this link');return `https://www.instagram.com/${$[1]==='reel/'?'tv/':$[1]}${$[2]}/?__a=1&__d=dis`})()","res":":\nconst use_sidebar = true\n\nvar i=JSON.parse($._);\ni=i.items?i.items[0]:i.graphql?.shortcode_media;\nvar f=i.user?.full_name??i.owner?.full_name;\nvar u=i.user?.username??i.owner?.username;\nvar t=new Date((i.taken_at||i.taken_at_timestamp)*1e3).toLocaleString('en-GB');\nvar c=i.caption ? i.caption.text : i.edge_media_to_caption?.edges[0]?.node?.text ? i.edge_media_to_caption.edges[0].node.text : '';\nc = [`@${u}`, `(${f})`, t, c].join(use_sidebar?\"\\n\":\" | \");\nc = use_sidebar ? `<imagus-extension type=\"sidebar\">${c}</imagus-extension>` : c;\nlet m;\nif (i.carousel_media) m = i.carousel_media.map(x => [x.video_versions ? x.video_versions[0].url : x.image_versions2.candidates[0].url, c])\nelse if (i.video_versions) m = [i.video_versions[0].url, c];\nelse if (i.edge_sidecar_to_children) m = i.edge_sidecar_to_children.edges.map(i=>[i.node?.video_url||i.node?.display_url, c])\nelse if (i.video_url||i.display_url) m = [i.video_url??i.display_url, c]\nelse m = [i.image_versions2.candidates[0].url, c]\nthis.CNT.filename = u + '_' + (Array.isArray(m[0])?m[0][0]:m[0]).match(/\\/([^\\/.]+\\.\\w{3,4})(?:$|\\?)/)?.[1].replace(/[^\\w.-]/g,'_')??''\nif(use_sidebar)this.TRG.IMGS_ext_data=m;\nreturn use_sidebar?{loop:'imagus://extension'}:m","note":"illogikally + Imagus_fan (edit)\nhttps://www.reddit.com/r/imagus/comments/1bhj0jh/comment/kwgp6w6\nOLD\nhttps://www.reddit.com/r/imagus/comments/1aujfau/comment/krr1bo1\nhttps://www.reddit.com/r/imagus/comments/1aujfau/comment/kr4cf1d\n\n\n!!!\nВся информация о возможностях и особенностях фильтров для Инстаграм, а также о представленных в них опциях: см. Чаво, п.21.\n==\nAll information about the capabilities and features of the sieve, and also about the options presented in it: see FAQ, p.21.\n\n\nПРИМЕРЫ / EXAMPLES\n(внешние ссылки / external links)\nhttp://forum.ru-board.com/topic.cgi?forum=5&topic=50874&start=200#19"},"INSTAGRAM_html-p":{"off":1,"link":"^instagram\\.com/(?:[\\w.]+\\/)?(?:p|reel)/([\\w-]+).*","url":"data:,$1","res":":\nif (location.hostname !== 'www.instagram.com') return\n\nconst xhr = new XMLHttpRequest()\nxhr.open('GET', `https://www.instagram.com/p/${$[1]}/`, false)\nxhr.setRequestHeader('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8')\nxhr.send()\n\nconst item = JSON.parse(xhr.responseText.match(/xdt_api__v1__media__shortcode__web_info\":(.+)},\"extensions/)[1]).items[0]\nconst capt = [\n `@${item.user.username}${item.user.full_name ? ` (${item.user.full_name})` : ''}`,\n new Date(item.taken_at * 1000).toLocaleString(navigator.language, { dateStyle: 'medium', timeStyle: 'medium' }),\n item.caption?.text\n].filter(Boolean).join(' | ')\nconst res = (i) => [ i.video_versions?.[0].url || i.image_versions2.candidates[0].url, capt ]\n\nreturn item.carousel_media?.map((e) => res(e)) || res(item)","note":"64h\nhttp://forum.ru-board.com/topic.cgi?forum=5&topic=50874&start=2140#8\nOLD\nhttp://forum.ru-board.com/topic.cgi?forum=5&topic=50874&start=1520#20\nhttps://forum.ru-board.com/topic.cgi?forum=5&topic=50874&start=960#10\n\n!!!\nВся информация о возможностях и особенностях фильтров для Инстаграм, а также о представленных в них опциях: см. Чаво, п.21.\n==\nAll information about the capabilities and features of the sieve, and also about the options presented in it: see FAQ, p.21.\n\n\nПРИМЕРЫ / EXAMPLES\n(внешние ссылки / external links):\nhttp://forum.ru-board.com/topic.cgi?forum=5&topic=50874&start=200#19"},"INSTAGRAM_priv_api-p":{"off":1,"link":"^instagr(?:am\\.com|\\.am)/(?:p|reel)/([\\w.-]+)(?:\\W|$)(?!\\?e=|liked_by|comments).*","url":": (()=>{var disable_on_timestamps = false ; if(disable_on_timestamps&&(this.node.className===\"x1i10hfl xjbqb8w x6umtig x1b1mbwd xaqea5y xav7gou x9f619 x1ypdohk xt0psk2 xe8uvvx xdj266r x11i5rnm xat24cr x1mh8g0r xexx8yu x4uap5 x18d9i69 xkhd6sd x16tdsg8 x1hl2dhg xggy1nq x1a2a7pz _a9zg _a6hd\"||this.node.nodeName==='TIME'||this.node.nodeName==='SPAN'))throw new Error('Not used on this link');return 'data:,'+$[1]})()","res":":\nconst alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'\nconst media_pk = [...$[1]].reduce((a, v, i) => a + BigInt(alphabet.length ** ($[1].length - i - 1) * alphabet.indexOf(v)), 0n)\nconst x = new XMLHttpRequest()\nx.open('GET', `https://i.instagram.com/api/v1/media/${media_pk}/info/`, false)\nx.setRequestHeader('X-IG-App-ID', '936619743392459')\nif (!/firefox/i.test(navigator.userAgent)) {\n x.withCredentials = true\n}\nx.send()\nif (x.status !== 200) {\n return [ 'data:image/svg+xml,' + encodeURIComponent(`\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"120\" width=\"360\" style=\"background-color: #2a2a2a;\">\n <foreignObject height=\"100%\" width=\"100%\">\n <div xmlns=\"http://www.w3.org/1999/xhtml\" style=\"display: table; height: 100%; width: 100%;\">\n <span style=\"color: tomato; display: table-cell; font: 18px sans-serif; vertical-align: middle; text-align: center; white-space: pre-wrap;\">\n Something went wrong\\nHTTP status ${x.status}: ${x.statusText}\n </span>\n </div>\n </foreignObject>\n </svg>`.replace(/\\n\\s+/g, '')), ' ' ]\n}\nconst item = JSON.parse(x.responseText).items[0]\nconst capt = [\n `@${item.user.username}${item.user.full_name ? ` (${item.user.full_name})` : ''}`,\n new Date(item.taken_at * 1000).toLocaleString(navigator.language, { dateStyle: 'medium', timeStyle: 'medium' }),\n item.caption?.text\n].filter(Boolean).join(' | ')\nconst res = (i) => [ i.video_versions?.[0].url || i.image_versions2.candidates[0].url, capt ]\nreturn item.carousel_media?.map((e) => res(e)) || res(item)","note":"64h + Imagus_fan (edit)\nhttps://www.reddit.com/r/imagus/comments/170lv0t/comment/k3nf9mi\nOLD\nhttp://forum.ru-board.com/topic.cgi?forum=5&topic=50874&start=1520#20\nhttps://forum.ru-board.com/topic.cgi?forum=5&topic=50874&start=960#10\n\n!!!\nВся информация о возможностях и особенностях фильтров для Инстаграм, а также о представленных в них опциях: см. Чаво, п.21.\n==\nAll information about the capabilities and features of the sieve, and also about the options presented in it: see FAQ, p.21.\n\nПРИМЕРЫ / EXAMPLES\n(внешние ссылки / external links):\nhttp://forum.ru-board.com/topic.cgi?forum=5&topic=50874&start=200#19"}}
Advertisement
Add Comment
Please, Sign In to add comment