From e33893a60bc48c8bf7a1ecf705b7c9a4fd8e5e08 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Wed, 10 Feb 2016 19:54:11 +0000 Subject: Remove urban dictionary temporarily as the API has moved --- bladictionary.py | 11 ++++------- 1 file 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 ) -- cgit v1.2.3