const COUNTRY_MAP = { "qatar": 1, "ecuador": 2, "senegal": 3, "netherlands": 4, "england": 5, "iran": 6, "united states": 7, "wales": 8, "argentina": 9, "saudi arabia": 10, "mexico": 11, "poland": 12, "france": 13, "denmark": 14, "tunisia": 15, "australia": 16, "spain": 17, "germany": 18, "japan": 19, "costa rica": 20, "belgium": 21, "canada": 22, "morocco": 23, "croatia": 24, "brazil": 25, "serbia": 26, "switzerland": 27, "cameroon": 28, "portugal": 29, "ghana": 30, "uruguay": 31, "south korea": 32, "no country": 33 } const CHAMPION_PATTERN = /Champions<\/th>.*?(.*?)<\/a>.*?<\/td>/ const SOURCE = "https://en.wikipedia.org/wiki/2022_FIFA_World_Cup" httpGET(SOURCE, {}, (rawResponse, certificate) => { const patternMatch = rawResponse.match(CHAMPION_PATTERN) fulfill({certificate:certificate, winner:COUNTRY_MAP[patternMatch[1].trim().toLowerCase()]}) }, (errorMessage) => {})