@hardbulls/wbsc-crawler
Advanced tools
Comparing version 0.4.4 to 0.4.5
@@ -44,3 +44,4 @@ "use strict"; | ||
} | ||
const teamInfo = (0, Selector_1.querySelectorOrThrow)(row, ".score"); | ||
const teamInfo = row.querySelector(".score") || | ||
(0, Selector_1.querySelectorOrThrow)(row, ".regular-score"); | ||
const awayTeamInfo = (0, Selector_1.querySelectorOrThrow)(teamInfo, "div.team-info:nth-child(1)"); | ||
@@ -50,7 +51,9 @@ const awayTeamName = (_d = (0, Selector_1.querySelectorOrThrow)(awayTeamInfo, "p:nth-child(4)p:nth-child(4)").textContent) === null || _d === void 0 ? void 0 : _d.trim(); | ||
const homeTeamName = (_e = (0, Selector_1.querySelectorOrThrow)(homeTeamInfo, "p:nth-child(4)p:nth-child(4)").textContent) === null || _e === void 0 ? void 0 : _e.trim(); | ||
const scoreInfo = (_f = (0, Selector_1.querySelectorOrThrow)(row, "div.score > div:nth-child(2) > p").textContent) === null || _f === void 0 ? void 0 : _f.trim(); | ||
const scoreInfo = row.querySelector("div.score > div:nth-child(2) > p") || | ||
(0, Selector_1.querySelectorOrThrow)(row, "div.regular-score > div:nth-child(2) > p"); | ||
const scoreInfoText = (_f = scoreInfo.textContent) === null || _f === void 0 ? void 0 : _f.trim(); | ||
let awayScore = 0; | ||
let homeScore = 0; | ||
if (scoreInfo) { | ||
const parsedScore = scoreInfo | ||
if (scoreInfoText) { | ||
const parsedScore = scoreInfoText | ||
.split(":") | ||
@@ -57,0 +60,0 @@ .map((v) => Number.parseInt(v.trim())); |
{ | ||
"name": "@hardbulls/wbsc-crawler", | ||
"version": "0.4.4", | ||
"version": "0.4.5", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "Tool to crawl events, leagues and statistics from WBSC based websites.", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30392
531