def get_results_from_unique(name_, type_): # result = fetch_single_unique(name=name_, type=type_) query = create_item_query(name=name_, type=type_) fetch_ids, unsplit_queries = recurse_fetch_query_with_query_divider( query, [generate_by_ilvl, generate_by_price]) return fetch_results(fetch_ids)
def get_results_from_unique(name_, type_): result = fetch_single_unique(name=name_, type=type_) query = create_item_query(name=name_, type=type_, price_low=0, price_high=150 * 50) fetch_ids, unsplit_queries = recurse_fetch_query_with_query_divider( query, [partial(generate_by_roll_ranges, result=result), generate_by_ilvl, generate_by_price] ) return fetch_results(fetch_ids)
def fetch_all_corrupt_uniques(): stripped_name = f"""./data/skin_of_the_lords""" try: query = create_item_query(name="Skin of the Lords", type="Simple Robe", corrupted=False) fetch_ids, unsplit_queries = recurse_fetch_query_with_query_divider( query, [generate_by_ilvl, generate_by_price]) results = fetch_results(fetch_ids) results_jsonl(results, stripped_name) # parse_results_to_csv(stripped_name) except Exception as e: traceback.print_exc() print(e)
type="Great Crown", identified=True), affix_type="explicit", exclude_affixes=[attr_mod], use_added_filter_for_speed=False, ) for mod in tqdm(mods): results_entry = {"mod_str": str(mod), "mod_json": json.dumps(mod.json())} mod_stat_filters = StatFilters(filters=mod.to_query_stat_filters()) fetch_ids, total, query = search_query( OfficialApiQuery( name="Forbidden Shako", type="Great Crown", identified=True, corrupted=False, enchanted=False, indexed="2week", stat_filters=[mod_stat_filters], ).json()) print(mod, total) results = fetch_results(fetch_ids) for idx, result in enumerate(results): parsed_result = OfficialApiResult(result) results_entry[f"price_{idx}"] = estimate_price_in_chaos( parsed_result.price) results_df = results_df.append(results_entry, ignore_index=True) results_df.to_csv(f"data/forbidden_shako.csv")
def fetch_single_unique(name, type): query = create_item_query(name=name, type=type, price_low=0, price_high=150 * 150) fetch_ids, total, query = fetch_query(query) first_fetch_id = [fetch_ids[0]] results = fetch_results(first_fetch_id) return results[0]
def fetch_single_unique(name, type): query = create_item_query(name=name, type=type) fetch_ids, total, query = search_query(query) first_fetch_id = [fetch_ids[0]] results = fetch_results(first_fetch_id) return results[0]