moved stuff around

This commit is contained in:
2024-07-02 08:04:21 -05:00
parent f38a9f9df5
commit eaf229abde
11 changed files with 422 additions and 155 deletions
+34
View File
@@ -0,0 +1,34 @@
package scraper
type Event struct {
Url string `json:"url"`
Slug string `json:"slug"`
Name string `json:"name"`
Location string `json:"location"`
Organization string `json:"organization"`
Image string `json:"image"`
Date int `json:"date"`
Fights []Fight `json:"fights"`
}
type Fight struct {
Weight string `json:"weight"`
FighterA *Fighter `json:"fighter_a"`
FighterB *Fighter `json:"fighter_b"`
}
type Fighter struct {
Name string `json:"name"`
Image string `json:"image"`
Country string `json:"country"`
Link string `json:"link"`
}
type EventCallback func(e *Event)
type EventScraper func(c EventCallback)
const USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
var Scrapers []EventScraper = []EventScraper{
ScrapeUFC,
}