Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

unknown error #2

Open
snowbows opened this issue Apr 27, 2022 · 1 comment
Open

unknown error #2

snowbows opened this issue Apr 27, 2022 · 1 comment

Comments

@snowbows
Copy link

Not sure if the library is still maintained but when trying out the sample code I get an unknown error (see below).

package main

import (
	"context"
	"fmt"
	"time"

	epg "github.com/TV4/epg"
)

func main() {
	var (
		ec   = epg.NewClient()
		ctx  = context.Background()
		date = epg.DateAtTime(time.Now())
	)

	r, err := ec.Get(ctx, epg.Sweden, epg.Swedish, date)
	if err != nil {
		fmt.Println(err)
		return
	}

	c := r.Day().Channel(epg.TV4)

	for _, s := range c.Schedules {
		fmt.Println(s.CalendarDate.Format("15:04"), s.Program.Title)
	}
}
$ go run main.go                                                                                                                                   
unknown error
@peterhellberg
Copy link
Contributor

I have not worked on this package in years, but it seems that the underlying API is experiencing some issues.

For example https://api.cmore.se/epg/se/sv/2022-04-27 gives an XML containing the message Oops! Sorry! Something went wrong. Please contact [email protected] if this error persist. (with the exception The underlying provider failed on Open.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants