Help us shape the future of Go! Take the 2026 Go Developer Survey

svgastronomie

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 9 Imported by: 2

README

go-svgastronomie

license version go reference GitHub

A web scraper for extracing the weekly menu from sv-gastronomie.de.

Installation

go get github.com/EchterTimo/go-svgastronomie

Usage

coming soon

The website sv-gastronomie.de does not provide an official public API.

As of August 2026, automated access is explicitly permitted via their robots.txt:

User-agent: *
Disallow: 

Use this scraper responsibly and at your own risk.

This project is not affiliated with or endorsed by sv-group

Documentation

Overview

Package svgastronomie provides functions to fetch the weekly menu of a SV restaurant from sv-gastronomie.de

Index

Constants

View Source
const (
	BaseURL         string = "https://sv-gastronomie.de"
	MenuURL         string = BaseURL + "/menu"
	MenuTemplateURL string = BaseURL + "/menu/%s/%s" // %s is the restaurant URL
)

Below are constants used in the svgastronomie package.

Variables

This section is empty.

Functions

func Install

func Install()

Install checks if Playwright is installed and installs it if not.

Types

type Day

type Day struct {
	Time   time.Time `json:"time"` // Time is the current date in the format YYYY-MM-DD 00:00:00 UTC.
	Dishes []Dish    `json:"dishes"`
}

Day represents the menu for a specific day.

type Dish

type Dish struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Price       float64  `json:"price"`
	Tags        []string `json:"tags"`
}

Dish represents a single dish available on a specific day.

type Restaurant

type Restaurant struct {
	URL      string `json:"url"`
	Location string `json:"location"`
	MenuCard string `json:"menu_card"`
	Week     Week   `json:"week"`
}

Restaurant represents a restaurant available on sv-gastronomie.de.

func ScrapeRestaurant

func ScrapeRestaurant(
	url string,
	handleNewDay func(day Day),
) (*Restaurant, error)

ScrapeRestaurant scrapes the restaurant's page and returns a Restaurant object.

The handleNewDay is an optional callback function that can be used to handle new days as they are scraped.

type Week

type Week struct {
	Days []Day `json:"days"`
}

Week represents the menu for a specific week.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL