Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func main() {
- //..http request
- //..parse using html.parse().
- // Define a function to iterate through the HTML document
- var processAllPokemon func(*html.Node)
- processAllPokemon = func(n *html.Node) {
- // Check for all <li> elements
- if n.Type == html.ElementNode && n.Data == "li" {
- // Process the details of the Pokémon within this <li> element
- processPokemonDetails(n)
- }
- //.. rest of the code remains the same
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement