mirror of
https://github.com/miniflux/v2.git
synced 2025-07-27 17:28:38 +00:00
Add HTTP proxy option for subscriptions
This commit is contained in:
parent
0f258fd55b
commit
cf7712acea
40 changed files with 201 additions and 65 deletions
|
@ -26,13 +26,18 @@ var (
|
|||
)
|
||||
|
||||
// FindSubscriptions downloads and try to find one or more subscriptions from an URL.
|
||||
func FindSubscriptions(websiteURL, userAgent, username, password string) (Subscriptions, *errors.LocalizedError) {
|
||||
func FindSubscriptions(websiteURL, userAgent, username, password string, fetchViaProxy bool) (Subscriptions, *errors.LocalizedError) {
|
||||
websiteURL = findYoutubeChannelFeed(websiteURL)
|
||||
websiteURL = parseYoutubeVideoPage(websiteURL)
|
||||
|
||||
request := client.New(websiteURL)
|
||||
request.WithCredentials(username, password)
|
||||
request.WithUserAgent(userAgent)
|
||||
|
||||
if fetchViaProxy {
|
||||
request.WithProxy()
|
||||
}
|
||||
|
||||
response, err := browser.Exec(request)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue