Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Pikyidea
.
Toggle Highlighting
SQL
async function run() { var rows = document.getElementsByClassName('users')[0].children[1].children; var relations = []; var users = []; for (row of rows) { console.log(row.children[0].children[0].textContent) var url = row.children[0].children[0].href; var fe_resp = await fetch(url); var el = document.createElement('html'); el.innerHTML = await fe_resp.text(); var id = (new URL(url).searchParams.get('id')) users.push({id: id, name: row.children[0].children[0].textContent}) var outgoing = el.getElementsByClassName('given')[1].children[2].children for (c of outgoing) { relations.push({id_from: id, id_to: (new URL(c.children[1].children[0].href)).searchParams.get('id')}) } } console.log({relations: relations, users: users}) } run()
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...