diff options
author | Joe Robinson <joe@lc8n.com> | 2016-02-10 19:54:11 +0000 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2016-02-10 19:54:11 +0000 |
commit | e33893a60bc48c8bf7a1ecf705b7c9a4fd8e5e08 (patch) | |
tree | 04438110682708b4540c491b9f2aa2509ff64c90 /bladictionary.py | |
parent | 5dea49a8b94f286e956390c884cd34395d6f6043 (diff) |
Remove urban dictionary temporarily as the API has moved
Diffstat (limited to 'bladictionary.py')
-rwxr-xr-x | bladictionary.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/bladictionary.py b/bladictionary.py index d49dd43..c4dd1d8 100755 --- a/bladictionary.py +++ b/bladictionary.py @@ -9,7 +9,7 @@ import sqlite3 import requests from definition import Definition -VERSION = "2.4.3" +VERSION = "2.4.4" def get_xml(word, word_dict): api_url = "http://services.aonaware.com/DictService/DictService.asmx/DefineInDict?dictId="+word_dict+"&word="+word @@ -359,20 +359,17 @@ def main(): elif word_dict == "foldoc" or word_type == "tech": items = get_sql(word, "foldoc") elif word_dict == "urban": - items = parse_urban(word) + print "Urban dictionary API is currently down :(" + sys.exit( 0 ) else: if word_dict is None or word_dict == "": word_dict = "wn" items = get_sql(word, "wn") - + foldoc_items = get_sql(word, "foldoc") if foldoc_items is not None and len(foldoc_items) > 0: items += foldoc_items - urban_items = parse_urban(word) - if urban_items is not None and len(urban_items) > 0: - items += urban_items - if items is None or len(items) == 0: print "No definitions found for "+word sys.exit( 1 ) |