@@ -128,6 +128,9 @@ zeeschuimer.register_module(
128128 // hashtag, location view
129129 view = "search" ;
130130 }
131+ } else if ( path [ 0 ] === "popular" ) {
132+ // "popular" page 2026-2-24 adds tags or locations after i.e. /popular/TAG
133+ view = "popular" ;
131134 } else if ( path [ 0 ] === "reels" ) {
132135 // reels explore page
133136 view = "reels" ;
@@ -215,6 +218,7 @@ zeeschuimer.register_module(
215218 }
216219
217220 let datas = [ ] ;
221+ let response_is_json = false ;
218222 try {
219223 // some responses have this prefix that needs to be removed before parsing
220224 // e.g. /api/vi1/clips/music/...
@@ -223,6 +227,7 @@ zeeschuimer.register_module(
223227 }
224228 // if it's JSON already, just parse it
225229 datas . push ( JSON . parse ( response ) ) ;
230+ response_is_json = true ;
226231 } catch {
227232 // data can be embedded in the HTML in these JavaScript statements
228233 // - single post pages (e.g. https://www.instagram.com/p/C1hWCZLPQ9T/)
@@ -324,12 +329,15 @@ zeeschuimer.register_module(
324329 items = medias ;
325330 } else {
326331 // If nodes themselves look like media objects (have id & media_type), use them
327- const nodeMediaLike = nodes . filter ( n => n && 'id' in n && 'media_type' in n ) ;
332+ // Partial reels may use __typename: "XIGPolarisVideoMedia" e.g. on /popular/ taged view
333+ const nodeMediaLike = nodes . filter ( n => n && 'id' in n && ( 'media_type' in n || ( '__typename' in n && [ "XIGPolarisVideoMedia" , "XIGPolarisImageMedia" ] . includes ( n . __typename ) ) ) ) ;
328334 if ( nodeMediaLike . length > 0 ) {
329335 if ( debug_logs ) console . log ( 'processing edges list (w/o media) from ' + source_url ) ;
330336 items = nodeMediaLike ;
331337 // Tagged posts page e.g. https://www.instagram.com/steveo/tagged/
332338 // ✔️ confirmed working 2026-feb-5
339+ // Popular page e.g. https://www.instagram.com/popular/tag_name/
340+ // ✔️ confirmed working 2026-feb-24
333341 } else {
334342 // fallback to original property
335343 items = obj [ property ] ;
@@ -390,7 +398,7 @@ zeeschuimer.register_module(
390398 return (
391399 item
392400 && "id" in item
393- && "media_type" in item
401+ && ( "media_type" in item || ( "__typename" in item && [ "XIGPolarisVideoMedia" , "XIGPolarisImageMedia" ] . includes ( item . __typename ) ) )
394402 && "user" in item
395403 // && "caption" in item (partial reels may not have captions)
396404 // ensure post/reel is "seen" (if that info is available)
@@ -446,7 +454,7 @@ zeeschuimer.register_module(
446454 if ( debug_logs ) console . log ( 'processing post/reel id ' + edge . code ) ;
447455
448456 // These are partial reel objects from user/audio/and other pages
449- if ( ! ( 'caption' in edge ) || ! ( 'video_versions' in edge ) ) {
457+ if ( ! ( 'caption' in edge ) || ! ( 'video_versions' in edge ) || ! ( 'media_type' in edge ) ) {
450458 edge = Object . assign ( { } , edge , {
451459 _zs_partial : true
452460 } ) ;
@@ -459,6 +467,7 @@ zeeschuimer.register_module(
459467
460468 edge = Object . assign ( { } , edge , {
461469 _zs_instagram_view : view ,
470+ _zs_html_embedded_json : ! response_is_json
462471 } ) ;
463472
464473 return edge ;
0 commit comments