diff options
author | Evgeny Kuznetsov <evgeny@kuznetsov.md> | 2022-05-01 12:09:00 +0300 |
---|---|---|
committer | Evgeny Kuznetsov <evgeny@kuznetsov.md> | 2022-05-01 12:09:00 +0300 |
commit | 9d6b876b406a0a40eb62d2da03d7f15d813ca7d6 (patch) | |
tree | f607883ea1d2eb6001fbf5a6664fccf09afc185a /main.go | |
parent | b40a94f0f128e532a338cf20aeb88d0a6873e589 (diff) | |
download | radiorus-rss-9d6b876b406a0a40eb62d2da03d7f15d813ca7d6.tar.gz radiorus-rss-9d6b876b406a0a40eb62d2da03d7f15d813ca7d6.zip |
add option to use smotrim.ru directly
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -51,6 +51,7 @@ var ( episodeUrlRe = regexp.MustCompile(`<a href="/brand/(.+?)?" class="title`) outputPath, programNumber string + smotrim bool errBadEpisode = fmt.Errorf("bad episode") errCantParse = fmt.Errorf("could not parse page") @@ -61,9 +62,13 @@ var ( func main() { flag.StringVar(&outputPath, "path", "./", "path to put resulting RSS file in") flag.StringVar(&programNumber, "brand", "57083", "brand number (defaults to Aerostat)") + flag.BoolVar(&smotrim, "smotrim", false, "use smotrim.ru directly") flag.Parse() url := "https://www.radiorus.ru/brand/" + programNumber + "/episodes" + if smotrim { + url = "https://smotrim.ru/brand/" + programNumber + } feed := processURL(url) |