Parser (Go) Go Referenceopen in new window

Parsing progress

Parse Wikipedia pages to extract events


Requires Goopen in new window v1.16 and greater

go get -u


package main

import (


func main() {
    wiki, _ := http.Get("")
    events, err := parser.Parse(wiki.Body, parser.ParserOptions{
        IncludeOriginal: options.IncludeOriginal,
    if err != nil {


Will return

{Three <a href="" class="mw-disambig" title="Palestine">Palestinians</a> are killed and nine more are injured by <a href="" title="Israel Defense Forces">Israeli soldiers</a> during <a href="" class="mw-disambig" title="Raid">raids</a> in the <a href="" title="West Bank">West Bank</a>.   Three Palestinians are killed and nine more are injured by Israeli soldiers during raids in the West Bank.    [{Israeli–Palestinian conflict /wiki/Israeli%E2%80%93Palestinian_conflict}] {Israeli–Palestinian conflict /wiki/Israeli%E2%80%93Palestinian_conflict} [{Al Jazeera}] {Al Jazeera} [{Palestinians /wiki/Palestine} {Israeli soldiers /wiki/Israel_Defense_Forces} {raids /wiki/Raid} {West Bank /wiki/West_Bank}] 2022-03-15 00:00:00 +0000 UTC  39a3957c19983045b75204aec9ff1781f79e1267}