diff --git a/plugins/minecraft_bukkit.py b/plugins/minecraft_bukkit.py index 49b4593..c72b0e5 100644 --- a/plugins/minecraft_bukkit.py +++ b/plugins/minecraft_bukkit.py @@ -1,4 +1,4 @@ -from util import hook, http, web +from util import hook, http, web, text import time import random @@ -79,7 +79,7 @@ def plugin_details(slug): def format_output(data): """ takes plugin data and returns two strings representing information about that plugin """ name = data["plugin_name"] - description = data['description'] + description = text.truncate_str(data['description'], 30) url = data['website'] authors = data['authors'][0] authors = authors[0] + u"\u200b" + authors[1:] diff --git a/plugins/newegg.py b/plugins/newegg.py index 072ad94..1f02cf5 100644 --- a/plugins/newegg.py +++ b/plugins/newegg.py @@ -52,6 +52,8 @@ def format_item(item): tag_text, url) +## HOOK FUNCTIONS + @hook.regex(*NEWEGG_RE) def newegg_url(match): item_id = match.group(1) @@ -65,17 +67,8 @@ def newegg(inp): # form the search request request = { - "PageNumber": 1, - "BrandId": -1, - "NValue": "", - "StoreDepaId": -1, - "NodeId": -1, "Keyword": inp, - "IsSubCategorySearch": False, - "SubCategoryId": -1, - "Sort": "FEATURED", - "CategoryId": -1, - "IsUPCCodeSearch": False + "Sort": "FEATURED" } # submit the search request