Helpviewer/OpenSearch/OpenSearchDefaultEngines.py

changeset 0
de9c2efb9d02
child 13
1af94a91f439
equal deleted inserted replaced
-1:000000000000 0:de9c2efb9d02
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2009 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module defining the default search engines.
8 """
9
10 OpenSearchDefaultEngines = {
11 "Amazon_com" : """<?xml version="1.0" encoding="UTF-8"?>
12 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
13 <ShortName>Amazon.com</ShortName>
14 <Description>Amazon.com Search</Description>
15 <Url method="get" type="text/html" template="http://www.amazon.com/exec/obidos/external-search/?field-keywords={searchTerms}" />
16 <Image width="16" height="16">http://www.amazon.com/favicon.ico</Image>
17 </OpenSearchDescription>""",
18
19 "Bing" : """<?xml version="1.0" encoding="UTF-8"?>
20 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
21 <ShortName>Bing</ShortName>
22 <Description>Bing Web Search</Description>
23 <Url method="get" type="text/html" template="http://www.bing.com/search?cc={language}&amp;q={searchTerms}" />
24 <Image width="16" height="16">http://www.bing.com/s/wlflag.ico</Image>
25 </OpenSearchDescription>""",
26
27 "Google" : """<?xml version="1.0" encoding="UTF-8"?>
28 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
29 <ShortName>Google</ShortName>
30 <Description>Google Web Search</Description>
31 <Url method="get" type="text/html" template="http://www.google.com/search?hl={language}&amp;lr=lang_{language}&amp;q={searchTerms}" />
32 <Url method="get" type="application/x-suggestions+json" template="http://suggestqueries.google.com/complete/search?json=t&amp;hl={language}&amp;q={searchTerms}&amp;nolabels=t" />
33 <Image width="16" height="16">http://www.google.com/favicon.ico</Image>
34 </OpenSearchDescription>""",
35
36 "Google_Im_Feeling_Lucky" : """<?xml version="1.0" encoding="UTF-8"?>
37 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
38 <ShortName>Google (I'm Feeling Lucky)</ShortName>
39 <Description>Google Web Search</Description>
40 <Url method="get" type="text/html" template="http://www.google.com/search?btnI=&amp;hl={language}&amp;lr=lang_{language}&amp;q={searchTerms}" />
41 <Url method="get" type="application/x-suggestions+json" template="http://suggestqueries.google.com/complete/search?json=t&amp;hl={language}&amp;q={searchTerms}&amp;nolabels=t" />
42 <Image width="16" height="16">http://www.google.com/favicon.ico</Image>
43 </OpenSearchDescription>""",
44
45 "LinuxMagazin_de" : """<?xml version="1.0" encoding="UTF-8"?>
46 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
47 <ShortName>Linux-Magazin</ShortName>
48 <Description>Suche auf www.linux-magazin.de</Description>
49 <Url type="text/html" method="GET" template="http://www.linux-magazin.de/content/search?SearchText={searchTerms}" />
50 <Image width="16" height="16">http://www.linux-magazin.de/extension/lnm/design/linux_magazin/images/favicon.ico</Image>
51 </OpenSearchDescription>""",
52
53 "Reddit" : """<?xml version="1.0" encoding="UTF-8"?>
54 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
55 <ShortName>Reddit</ShortName>
56 <Description>Reddit Site Search</Description>
57 <Url method="get" type="text/html" template="http://www.reddit.com/search?q={searchTerms}" />
58 <Image width="16" height="16">http://www.reddit.com/favicon.ico</Image>
59 </OpenSearchDescription>""",
60
61 "Wikipedia_en" : """<?xml version="1.0" encoding="UTF-8"?>
62 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
63 <ShortName>Wikipedia (en)</ShortName>
64 <Description>Full text search in the English Wikipedia</Description>
65 <Url method="get" type="text/html" template="http://en.wikipedia.org/wiki/Special:Search?search={searchTerms}&amp;fulltext=Search" />
66 <Url method="get" type="application/x-suggestions+json" template="http://en.wikipedia.org/w/api.php?action=opensearch&amp;search={searchTerms}&amp;namespace=0" />
67 <Image width="16" height="16">http://en.wikipedia.org/favicon.ico</Image>
68 </OpenSearchDescription>""",
69
70 "Yahoo" : """<?xml version="1.0" encoding="UTF-8"?>
71 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
72 <ShortName>Yahoo!</ShortName>
73 <Description>Yahoo Web Search</Description>
74 <Url method="get" type="text/html" template="http://search.yahoo.com/search?ei=utf-8&amp;fr=sfp&amp;iscqry=&amp;p={searchTerms}" />
75 <Url method="get" type="application/x-suggestions+json" template="http://ff.search.yahoo.com/gossip?output=fxjson&amp;command={searchTerms}" />
76 <Image width="16" height="16">http://m.www.yahoo.com/favicon.ico</Image>
77 </OpenSearchDescription>""",
78
79 "YouTube" : """<?xml version="1.0" encoding="UTF-8"?>
80 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
81 <ShortName>YouTube</ShortName>
82 <Description>YouTube</Description>
83 <Url method="get" type="text/html" template="http://www.youtube.com/results?search_query={searchTerms}&amp;search=Search" />
84 <Url method="get" type="application/x-suggestions+json" template="http://suggestqueries.google.com/complete/search?ds=yt&amp;json=t&amp;hl={language}&amp;q={searchTerms}&amp;nolabels=t" />
85 <Image width="16" height="16">http://www.youtube.com/favicon.ico</Image>
86 </OpenSearchDescription>""",
87 }

eric ide

mercurial