mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add the possibility to override default user agent for each feed
This commit is contained in:
parent
1d335390c2
commit
2538eea177
29 changed files with 129 additions and 22 deletions
|
@ -29,11 +29,12 @@ var (
|
|||
)
|
||||
|
||||
// FindSubscriptions downloads and try to find one or more subscriptions from an URL.
|
||||
func FindSubscriptions(websiteURL, username, password string) (Subscriptions, error) {
|
||||
func FindSubscriptions(websiteURL, userAgent, username, password string) (Subscriptions, error) {
|
||||
defer timer.ExecutionTime(time.Now(), fmt.Sprintf("[FindSubscriptions] url=%s", websiteURL))
|
||||
|
||||
clt := client.New(websiteURL)
|
||||
clt.WithCredentials(username, password)
|
||||
clt.WithUserAgent(userAgent)
|
||||
response, err := clt.Get()
|
||||
if err != nil {
|
||||
if _, ok := err.(errors.LocalizedError); ok {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue