upadted to 1.24.0; fixed stb and spiddped doubles in precene
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
ScopeRuTracker string = "rutracker"
|
||||
ScopePrescene string = "prescene"
|
||||
ScopeWeb string = "web"
|
||||
ScopeInfo string = "info"
|
||||
ScopeRuTracker string = "rutracker"
|
||||
ScopePrescene string = "prescene"
|
||||
ScopeWeb string = "web"
|
||||
ScopeInfo string = "info"
|
||||
ScopeShareTheBrutality string = "stb"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -16,3 +17,12 @@ const (
|
||||
TagIgnore string = "ignore"
|
||||
ExternalSourcesTable string = "external_sources"
|
||||
)
|
||||
|
||||
const (
|
||||
StatusSuccess string = "success"
|
||||
StatusError string = "error"
|
||||
|
||||
StatusSucceed string = "succeed"
|
||||
StatusSuspicious string = "suspicious"
|
||||
StatusFailed string = "failed"
|
||||
)
|
||||
|
||||
@@ -8,4 +8,10 @@ const (
|
||||
FlagVersionShort = "v"
|
||||
FlagConfigFile = "config-file"
|
||||
FlagScopeEnable = "scope-enable"
|
||||
FlagSingleUri = "single-uri"
|
||||
FlagEnv = "env"
|
||||
|
||||
DefaultEnvProd = "prod"
|
||||
DefaultEnvDev = "devel"
|
||||
DefaultConfigPath = "config/default"
|
||||
)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package _interface
|
||||
|
||||
import "git.amok.space/yevhen/resource-scraper/types/model"
|
||||
import (
|
||||
"git.amok.space/yevhen/resource-scraper/internal/mail"
|
||||
"git.amok.space/yevhen/resource-scraper/types/model"
|
||||
)
|
||||
|
||||
type Rutracker interface {
|
||||
GetTopic(topics []string) ([]model.ExternalSources, error)
|
||||
@@ -9,3 +12,11 @@ type Rutracker interface {
|
||||
type Prescene interface {
|
||||
GetPage(pageNumbers []string) ([]model.ExternalSources, error)
|
||||
}
|
||||
|
||||
type ShareTheBrutality interface {
|
||||
GetMail(email string) ([]model.ExternalSources, *mail.EmailService)
|
||||
}
|
||||
|
||||
type MetalArchiveInterface interface{}
|
||||
|
||||
type Info interface{}
|
||||
|
||||
@@ -21,7 +21,7 @@ type Type string
|
||||
)*/
|
||||
|
||||
type ExternalSources struct {
|
||||
Id int `json:"id" db:"id"`
|
||||
Id int64 `json:"id" db:"id"`
|
||||
Type string `json:"type" db:"type"`
|
||||
TypeId int `json:"type_id" db:"type_id"`
|
||||
Title string `json:"title" db:"title"`
|
||||
|
||||
45
types/resource/metal-archive.go
Normal file
45
types/resource/metal-archive.go
Normal file
@@ -0,0 +1,45 @@
|
||||
package resource
|
||||
|
||||
import "github.com/golang-module/carbon/v2"
|
||||
|
||||
/*https://www.metal-archives.com/search/ajax-advanced/searching/albums/?bandName=&releaseTitle=&releaseYearFrom=2024&releaseMonthFrom=09&releaseYearTo=&releaseMonthTo=&country=&location=&releaseLabelName=&releaseCatalogNumber=&releaseIdentifiers=&releaseRecordingInfo=&releaseDescription=&releaseNotes=&genre=&sEcho=6&iColumns=4&sColumns=&iDisplayStart=1000&iDisplayLength=200&mDataProp_0=0&mDataProp_1=1&mDataProp_2=2&mDataProp_3=3&_=1726217541027*/
|
||||
|
||||
type AutoGenerated struct {
|
||||
Error string `json:"error"`
|
||||
ITotalRecords int `json:"iTotalRecords"`
|
||||
ITotalDisplayRecords int `json:"iTotalDisplayRecords"`
|
||||
SEcho int `json:"sEcho"`
|
||||
AaData [][]string `json:"aaData"`
|
||||
}
|
||||
|
||||
/*ALTER TABLE `go_tut_tokill`.`external_sources`
|
||||
CHANGE COLUMN `type` `type` ENUM('mmt', 'prescene', 'rutracker', 'locate', 'darkabyss', 'bfm', 'trash', 'nnmc', 'stb', 'bandcamp', 'deathgrind', 'ma') NULL DEFAULT NULL ;
|
||||
|
||||
*/
|
||||
|
||||
// AlbumQuery easy to debug https://www.freeformatter.com/url-parser-query-string-splitter.html
|
||||
type AlbumQuery struct {
|
||||
BandName string `param:"bandName"`
|
||||
ReleaseTitle string `param:"releaseTitle"`
|
||||
ReleaseYearFrom int `param:"releaseYearFrom"`
|
||||
ReleaseMonthFrom int `param:"releaseMonthFrom"`
|
||||
ReleaseYearTo int `param:"releaseYearTo"`
|
||||
ReleaseMonthTo int `param:"releaseMonthTo"`
|
||||
Country []string `param:"country"`
|
||||
Location string `param:"location"`
|
||||
ReleaseLabelName string `param:"releaseLabelName"`
|
||||
ReleaseCatalogNumber int `param:"releaseCatalogNumber"`
|
||||
ReleaseIdentifiers string `param:"releaseIdentifiers"`
|
||||
ReleaseRecordingInfo string `param:"releaseRecordingInfo"`
|
||||
ReleaseDescription string `param:"releaseDescription"`
|
||||
ReleaseNotes string `param:"releaseNotes"`
|
||||
Genre string `param:"genre"`
|
||||
ReleaseType []string `param:"releaseType"`
|
||||
SEcho string `param:"sEcho"`
|
||||
IColumns uint8 `param:"iColumns" default:"4"`
|
||||
SColumns string `param:"sColumns"`
|
||||
IDisplayStart uint8 `param:"iDisplayStart" default:"0"`
|
||||
IDisplayLength uint8 `param:"iDisplayLength" default:"200"`
|
||||
MDataProp uint8 `param:"mDataProp_%d"`
|
||||
Timestamp carbon.Carbon `param:"_"`
|
||||
}
|
||||
Reference in New Issue
Block a user