1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Add per feed cookies option

This commit is contained in:
Darius 2021-03-23 04:27:58 +01:00 committed by GitHub
parent b0c14aa8f9
commit 9242350f0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 114 additions and 15 deletions

View file

@ -22,6 +22,7 @@ type FeedForm struct {
KeeplistRules string
Crawler bool
UserAgent string
Cookie string
CategoryID int64
Username string
Password string
@ -43,6 +44,7 @@ func (f FeedForm) Merge(feed *model.Feed) *model.Feed {
feed.KeeplistRules = f.KeeplistRules
feed.Crawler = f.Crawler
feed.UserAgent = f.UserAgent
feed.Cookie = f.Cookie
feed.ParsingErrorCount = 0
feed.ParsingErrorMsg = ""
feed.Username = f.Username
@ -66,6 +68,7 @@ func NewFeedForm(r *http.Request) *FeedForm {
Title: r.FormValue("title"),
ScraperRules: r.FormValue("scraper_rules"),
UserAgent: r.FormValue("user_agent"),
Cookie: r.FormValue("cookie"),
RewriteRules: r.FormValue("rewrite_rules"),
BlocklistRules: r.FormValue("blocklist_rules"),
KeeplistRules: r.FormValue("keeplist_rules"),

View file

@ -20,6 +20,7 @@ type SubscriptionForm struct {
FetchViaProxy bool
AllowSelfSignedCertificates bool
UserAgent string
Cookie string
Username string
Password string
ScraperRules string
@ -63,6 +64,7 @@ func NewSubscriptionForm(r *http.Request) *SubscriptionForm {
AllowSelfSignedCertificates: r.FormValue("allow_self_signed_certificates") == "1",
FetchViaProxy: r.FormValue("fetch_via_proxy") == "1",
UserAgent: r.FormValue("user_agent"),
Cookie: r.FormValue("cookie"),
Username: r.FormValue("feed_username"),
Password: r.FormValue("feed_password"),
ScraperRules: r.FormValue("scraper_rules"),