MCPcopy
hub / github.com/wecatch/china_regions / parseVillage

Function parseVillage

main.js:310–325  ·  view source on GitHub ↗
(html)

Source from the content-addressed store, hash-verified

308
309// villagetr
310function parseVillage(html) {
311 let $ = renderDom(html);
312 let result = [];
313 $("tr.villagetr").each(function(index, element) {
314 let td0 = $(this).find("td").first();
315 let td1 = $(this).find("td").last();
316 let id = td0.text();
317 let name = td1.text();
318 result.push({
319 id: id,
320 name: name,
321 });
322 });
323
324 return result;
325}
326
327
328function pullCountryDataSync(cityPath, offset) {

Callers 2

mainFunction · 0.85
pullVillageDataSyncFunction · 0.85

Calls 1

renderDomFunction · 0.85

Tested by

no test coverage detected