quartz-research-note/content/EduroamのゲストID一覧をコピペしやすくする.md
松浦 知也 Matsuura Tomoya c5732a3fd0
All checks were successful
Build / build (push) Successful in 5m52s
[obsidian] vault backup: 2025-04-10 18:18:32[
2025-04-10 18:18:32 +09:00

22 lines
922 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
date: 2025-03-26 13:48
---
#tips #snippets
Eduroamではゲスト用のIDを複数個まとめて発行できるのだが、IDとパスワード一覧がコピペしづらくてしょうがない(かつ、パスワードには記号も混じっているため目コピが失敗しやすい)。
そこで、右クリック→検証から開発ツールを開いてコンソールのタブを開き、
ID一覧
```js
$$("body > p:nth-child(9) > table > tbody > tr").filter((node,idx) => idx%3==0).map(node=> node.querySelector("td > tt").childNodes[0].textContent)
```
パスワード一覧:
```js
$$("body > p:nth-child(9) > table > tbody > tr").filter((node,idx) => idx%3==1).map(node=> node.querySelector("td > tt").childNodes[0].textContent)
```
で取得した結果をコピーする。これをスプレッドシートとかに貼り付けて使う(カンマがつくので頑張って取り除こう)