add systemd service files
collect configiguration together update README
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/robfig/cron/v3"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
@@ -10,6 +13,37 @@ const (
|
||||
passwordField = `//*[@id="m_login_password"]`
|
||||
)
|
||||
|
||||
// xPath constants
|
||||
const (
|
||||
xPathArticle string = `(//*/article[contains(concat(" ", normalize-space(@class)," "), " _55wo ") and contains(concat(" ", normalize-space(@class)," "), " _5rgr ")])[1]`
|
||||
xPathArticleContent string = xPathArticle + `/div/div[contains(concat(" ", normalize-space(@class)," "), " _5rgt ") and contains(concat(" ", normalize-space(@class)," "), " _5nk5 ")]/span`
|
||||
xPathImageURL string = xPathArticle + `/div/div[2]/div[1]/a/div/div/i`
|
||||
xPathImageURL2 string = xPathArticle + `/div/div[2]/section/div/i`
|
||||
xPathImageURL3 string = xPathArticle + `/div/div[2]/section/div/div/i` // Video Preview
|
||||
xPathGiftURL string = xPathArticle + `/div/div[2]/section/a`
|
||||
xPathPostingURL string = xPathArticle + `/div/header/div[2]/div/div/div[1]/div/a`
|
||||
)
|
||||
|
||||
// internal URL constants
|
||||
const (
|
||||
fbPageURL string = "https://www.facebook.com/herowarsgame/"
|
||||
// fbGameURL for search on expaned urls
|
||||
fbGameURL string = "apps.facebook.com/mobaheroes"
|
||||
)
|
||||
|
||||
// Constants for all search for title of the Postings
|
||||
const (
|
||||
FreeTitanArtifact string = "FREE Titan Artifact"
|
||||
FreeSilverCaskets string = "FREE Silver Caskets"
|
||||
FreeSoulStones string = "Soul Stones"
|
||||
FreeSkinStones string = "Skin Stones"
|
||||
ActionKeepTheAmount string = "Keep the amount"
|
||||
FreeWinterfestBaubles string = "Winterfest Baubles"
|
||||
FreeTopFanPackage string = "Top Fan"
|
||||
FreeEnergyForFee string = "ENERGY FOR FREE"
|
||||
WinterfestRankingRewards string = "Winterfest ranking rewards"
|
||||
)
|
||||
|
||||
var (
|
||||
headers = map[string]interface{}{
|
||||
"Accept-Language": "de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7",
|
||||
@@ -17,4 +51,12 @@ var (
|
||||
nodes []*cdp.Node
|
||||
|
||||
randomText = viper.GetStringSlice("comment_on_posts")
|
||||
|
||||
dataFT *DataFT
|
||||
|
||||
lastUpdatePosted string
|
||||
regexStyleImage = regexp.MustCompile(`(?m)url\((.*)\);`)
|
||||
|
||||
// cronJob the Cronjob data
|
||||
cronJob *cron.Cron
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user