File tree Expand file tree Collapse file tree 3 files changed +13
-16
lines changed
Expand file tree Collapse file tree 3 files changed +13
-16
lines changed Original file line number Diff line number Diff line change 33from gui .gui import ActiveWindow , close_all_windows
44from item .generator import Currency , Item , ModInfo
55from utils .common import get_response , price_item
6+ from utils import config
67from utils .config import (
78 GUI_BG1 ,
89 GUI_BG2 ,
Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ def get_response(item):
4040
4141 return response
4242
43-
4443def get_trade_data (item ):
4544 """For the given item, find current listings and retrieve prices & times
4645
Original file line number Diff line number Diff line change 99import requests
1010from tqdm import tqdm
1111
12- import item .generator as ig
1312from item .itemModifier import ItemModifier , ItemModifierType
1413from utils import config
1514from utils .config import RELEASE_URL , VERSION
@@ -387,22 +386,20 @@ def open_exchange_site(rid, league):
387386
388387def get_poe_prices_info (item ):
389388 try :
390- if isinstance (item , ig .Item ):
391- league = bytes (config .LEAGUE , "utf-8" )
392- try :
393- results = requests .post (
394- b"http://poeprices.info/api?l="
395- + league
396- + b"&i="
397- + base64 .b64encode (bytes (item .text , "utf-8" ))
398- )
399- return results .json ()
400- except Exception :
401- logging .info ("poeprices.info is not available." )
402- return {}
403- else :
389+ league = bytes (config .LEAGUE , "utf-8" )
390+ try :
391+ results = requests .post (
392+ b"http://poeprices.info/api?l="
393+ + league
394+ + b"&i="
395+ + base64 .b64encode (bytes (item .text , "utf-8" ))
396+ )
397+ return results .json ()
398+ except Exception :
399+ logging .info ("poeprices.info is not available." )
404400 return {}
405401 except Exception :
406402 logging .error ("Could not retrieve data from poeprices.info" )
407403 logging .error (item .text )
408404 logging .error (traceback .print_exc ())
405+ return {}
You can’t perform that action at this time.
0 commit comments