()
| 571 | async function findMediaId() { |
| 572 | // method 1: extract from url. |
| 573 | function method1() { |
| 574 | let href = window.location.href; |
| 575 | let match = href.match( |
| 576 | /www.instagram.com\/stories\/[^\/]+\/(\d+)/ |
| 577 | ); |
| 578 | if (!href.includes("highlights") && match) return match[1]; |
| 579 | } |
| 580 | |
| 581 | // method 3 |
| 582 | async function method3() { |