東京都防災ページより https://www.bousai.metro.tokyo.lg.jp/taisaku/saigai/1007261/index.html 新型コロナウイルスの患者発生状況に関連したリンクを取得する
Array.from(document.querySelector('dl.linkdate').querySelectorAll('ul.objectlink')).filter((e)=>{return e.querySelector('a').textContent.includes('新型コロナウイルスに関連した患者の発生について')}).map((e)=>{return {title: e.textContent , url:e.querySelector('a').href} })
Chrome Developer Toolで上記を実行。下記のような結果を得る。
[