| 1124 | SearchEngine.__init__(self, license or YAHOO_LICENSE, throttle, language) |
| 1125 | |
| 1126 | def _authenticate(self, url): |
| 1127 | url.query.update({ |
| 1128 | "oauth_version": "1.0", |
| 1129 | "oauth_nonce": oauth.nonce(), |
| 1130 | "oauth_timestamp": oauth.timestamp(), |
| 1131 | "oauth_consumer_key": self.license[0], |
| 1132 | "oauth_signature_method": "HMAC-SHA1" |
| 1133 | }) |
| 1134 | url.query["oauth_signature"] = oauth.sign(url.string.split("?")[0], url.query, |
| 1135 | method = GET, |
| 1136 | secret = self.license[1] |
| 1137 | ) |
| 1138 | return url |
| 1139 | |
| 1140 | def search(self, query, type=SEARCH, start=1, count=10, sort=RELEVANCY, size=None, cached=True, **kwargs): |
| 1141 | """ Returns a list of results from Yahoo for the given query. |