New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several German television and shopping providers were added. Language support was added to the Wikipedia and the google provider. #159
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4176430
Added the second german television station (ZDF) to the available pro…
xoro 534663c
Added the first german television station (ARD) to the available prov…
xoro 346a79e
Added google maps to the available providers.
xoro 39842b2
Added idealo (german shopping comparison portal) to the available pro…
xoro 83e0d26
The Wikipedia provider was extended to support different regions.
xoro e8bf0a6
The Google provider was extended to support different regions.
xoro 09a3447
Renamed ard to ardmediathek and added it to the README.
xoro bc0ab8f
Renamed ard to ardmediathek and added it to the README. Using tv as t…
xoro 9045186
Tags of german sites are only provided to german users.
xoro 2598e4d
Idealo and ZDF are now mentioned in the README.
xoro 763aa2b
I missed something during renaming from ard to ardmediathek.
xoro bfb06b0
Forgot to close some brackets.
xoro File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package ardmediathek | ||
|
||
import ( | ||
"fmt" | ||
"net/url" | ||
|
||
"github.com/zquestz/s/providers" | ||
) | ||
|
||
func init() { | ||
providers.AddProvider("ardmediathek", &Provider{}) | ||
} | ||
|
||
// Provider merely implements the Provider interface. | ||
type Provider struct{} | ||
|
||
// BuildURI generates a search URL for ARD MEDIATHEK. | ||
func (p *Provider) BuildURI(q string) string { | ||
return fmt.Sprintf("https://www.ardmediathek.de/suche/%s/", url.QueryEscape(q)) | ||
} | ||
|
||
// Tags returns the tags relevant to this provider. | ||
func (p *Provider) Tags() []string { | ||
switch providers.Language() { | ||
case "de": | ||
return []string{"tv"} | ||
default: | ||
return []string{} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package googlemaps | ||
|
||
import ( | ||
"fmt" | ||
"net/url" | ||
|
||
"github.com/zquestz/s/providers" | ||
) | ||
|
||
func init() { | ||
providers.AddProvider("googlemaps", &Provider{}) | ||
} | ||
|
||
// Provider merely implements the Provider interface. | ||
type Provider struct{} | ||
|
||
// BuildURI generates a search URL for Google Maps. | ||
func (p *Provider) BuildURI(q string) string { | ||
return fmt.Sprintf("https://www.google.com/maps/search/?api=1&query=%s", url.QueryEscape(q)) | ||
} | ||
|
||
// Tags returns the tags relevant to this provider. | ||
func (p *Provider) Tags() []string { | ||
return []string{"search"} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package idealo | ||
|
||
import ( | ||
"fmt" | ||
"net/url" | ||
|
||
"github.com/zquestz/s/providers" | ||
) | ||
|
||
func init() { | ||
providers.AddProvider("idealo", &Provider{}) | ||
} | ||
|
||
// Provider merely implements the Provider interface. | ||
type Provider struct{} | ||
|
||
// BuildURI generates a search URL for IDEALO. | ||
func (p *Provider) BuildURI(q string) string { | ||
return fmt.Sprintf("https://www.idealo.de/preisvergleich/MainSearchProductCategory.html?q=%s", url.QueryEscape(q)) | ||
} | ||
|
||
// Tags returns the tags relevant to this provider. | ||
func (p *Provider) Tags() []string { | ||
switch providers.Language() { | ||
case "de": | ||
return []string{"shopping"} | ||
default: | ||
return []string{} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package zdf | ||
|
||
import ( | ||
"fmt" | ||
"net/url" | ||
|
||
"github.com/zquestz/s/providers" | ||
) | ||
|
||
func init() { | ||
providers.AddProvider("zdf", &Provider{}) | ||
} | ||
|
||
// Provider merely implements the Provider interface. | ||
type Provider struct{} | ||
|
||
// BuildURI generates a search URL for ZDF. | ||
func (p *Provider) BuildURI(q string) string { | ||
return fmt.Sprintf("https://www.zdf.de/suche?q=%s&synth=true&sender=Gesamtes+Angebot", url.QueryEscape(q)) | ||
} | ||
|
||
// Tags returns the tags relevant to this provider. | ||
func (p *Provider) Tags() []string { | ||
switch providers.Language() { | ||
case "de": | ||
return []string{"tv"} | ||
default: | ||
return []string{} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be left blank, search really indicates a more general purpose search like google/duckduckgo/etc. Most users won't want to search maps as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder, we should remove this tag. =)