diff options
author | a01200356 <a01200356@itesm.mx> | 2015-12-27 21:09:45 -0600 |
---|---|---|
committer | a01200356 <a01200356@itesm.mx> | 2015-12-27 21:09:45 -0600 |
commit | b3fde19ed59c6e05b1f076ea1f8a7cec21229083 (patch) | |
tree | 0880365c6937afbd5d6b5ca51f3ee830b15e0d74 /searx/engines | |
parent | 922565c8a9f1061c8f6bcfa2ea8a11667d111c7c (diff) | |
download | searxng-b3fde19ed59c6e05b1f076ea1f8a7cec21229083.tar.gz searxng-b3fde19ed59c6e05b1f076ea1f8a7cec21229083.zip |
Remove non API version (doesn't work)
Diffstat (limited to 'searx/engines')
-rw-r--r-- | searx/engines/wolframalpha.py | 60 | ||||
-rw-r--r-- | searx/engines/wolframalpha_api.py | 2 |
2 files changed, 1 insertions, 61 deletions
diff --git a/searx/engines/wolframalpha.py b/searx/engines/wolframalpha.py deleted file mode 100644 index be467681f..000000000 --- a/searx/engines/wolframalpha.py +++ /dev/null @@ -1,60 +0,0 @@ -""" - WolframAlpha - - @website http://www.wolframalpha.com/ - - @using-api yes - @results no c - @stable i guess so - @parse result -""" - -import wolframalpha - -# engine dependent config -paging = False - -# search-url -# url = 'http://www.wolframalpha.com/' -# search_url = url+'input/?{query}' - -client_id = '5952JX-X52L3VKWT8' -''' -# do search-request -def request(query, params): - params['url'] = search_url.format(query=urlencode({'i': query})) - print params - - return params - - -# get response from search-request -def response(resp): - print resp - - dom = html.fromstring(resp.text) - #resshit = dom.find_class('output pnt') - #for shit in resshit: - #print shit.text_content() - results = [] - #results.append({'url': 'https://wikipedia.org', 'title': 'Wolfie, lol', 'content': 'es kwatro'}) - #print results - #return results - - # parse results - for result in dom.xpath(results_xpath): - print result - - link = result.xpath(link_xpath)[0] - href = urljoin(url, link.attrib.get('href')) - title = escape(extract_text(link)) - content = escape(extract_text(result.xpath(content_xpath))) - - # append result - results.append({'url': href, - 'title': title, - 'content': content}) - - print results - return results -''' diff --git a/searx/engines/wolframalpha_api.py b/searx/engines/wolframalpha_api.py index 8390e91f9..b9da87c8e 100644 --- a/searx/engines/wolframalpha_api.py +++ b/searx/engines/wolframalpha_api.py @@ -23,7 +23,7 @@ def request(query, params): params['url'] = search_url.format(query=urlencode({'input': query}), api_key=api_key) - need this for url in response + # need this for url in response global my_query my_query = query |