Closed yesworId closed 2 months ago
Is this a good fix?
if not rj["total_count"] or not rj["assets"]: # let's assume that empty assets means zero orders and listings
return [], [], [], 0
As I understand if one of these lists will be empty, function is going to return empty lists. But why? We need to process different listings with own function for them, only if they are not empty. This is why I added this if statement
if assets:
To be sure that list is not empty - user has listings
Right now current function will return empty to_confirm and buy_orders lists, only if assets is empty. It shouldn't work like that.
@yesworId , I can't reproduce case with listings to confirm and buy orders now, unfortunately. Can you tell me what total_count
in received data object means? I assume, that this is count of all listings and orders. If I right, then total_count
equal 0 means there is nothing to return.
Look. under assets
key placed object(dict) with assets data (duplicated from listings and other lists for some reason). As you can see I parse it with _parse_item_descriptions_for_listings
and create a shared dicts with arguments/attrs for ItemDescription
model. Again, if I mind it right, empty assets
means there is nothing to return and other lists (to confirm, orders) are empty, so we can safely skip next moves and return [], [], [], 0
No problems. I'm happy to help you. total_count
is a number of all listings. Whether it's rendered market listings for item or your current listings on sale. The only problem with your solution is that you are assuming if total_count
is 0 (no item listings for sale) and assets
dict is empty too, because of no listings, you return active
(listings on sale), to_confirm
(listings to confirm) and buy_orders
as empty. Which is not correct. Because:
1) There can be different scenarios, ex: We have no listed items on sale, but active buy orders. Or even simply, listings, which are waiting to be confirmed.
2) We need to process each type of listings only if we got successful response from steam and each listing dict isn't empty.
I wanted to point out this comment
# pagination only for active listings. Don't know how to be with others
Pagination is truly only for active listings. Steam uses total_count
to show this number as number of all listings and I assume create correct amount of pages to navigate all active listings, which are on sale. Buy Orders are returning all, without any need of pagination and displayed on page as they are. You can see some people have tons of buy orders and their page is veeery long. I assume it's the same for listings that need confirmation.
Also important to point out, is that total_count
equal 0, when 'success': False
.
I assume, that this is count of all listings and orders. If I right, then
total_count
equal 0 means there is nothing to return.
I've tested this with and without any listed items on sale (sell orders). And current method returned my buy orders only when I had active listings on sale (1 or more items listed for sale). Even though in each test I had active buy orders.
I pasted example of output. It's loooooooong
{
"success": true,
"pagesize": 100,
"total_count": 2,
"assets": {
"440": {
"2": {
"14788276199": {
"currency": 0,
"appid": 440,
"contextid": "2",
"id": "14788276199",
"classid": "6055499240",
"instanceid": "6108294134",
"amount": "1",
"status": 2,
"original_amount": "1",
"unowned_id": "14788276199",
"unowned_contextid": "2",
"background_color": "3C352E",
"icon_url": "fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEYeQpDCSTmuSpKhs_ZCfeABN8Tj8M54MFq1Td5lgQ1YrGwZDMwJgaQB6IOWfFvpV_uWSMzv5c7UIa1oLhUeg7v59TGYOV6M8YMQZcOCP3m-A",
"icon_url_large": "fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEYeQpDCSTmuSpKhs_ZCfeABN8Tj8M54MFq1Td5lgQ1YrGwZDMwJgaQB6IOWfFvpV_uWSMzv5c7UIa1oLhUeg7v59TGYOV6M8YMQZcOCP3m-A",
"descriptions": [
{
"value": "Mercenary Grade Helmet",
"color": "4b69ff"
},
{
"value": "Style: Streamlined",
"color": "756b5e"
},
{
"value": " "
},
{
"value": " "
},
{
"value": "Summer 2024 Cosmetics Collection"
},
{
"value": " Hazardous Environment Vest",
"color": "eb4b4b"
},
{
"value": " Botler 2000",
"color": "eb4b4b"
},
{
"value": " Control Patrol",
"color": "d32ce6"
},
{
"value": " Free Mann's Fashion",
"color": "d32ce6"
},
{
"value": " Fire Marshal",
"color": "d32ce6"
},
{
"value": " Tuxedo Royale",
"color": "d32ce6"
},
{
"value": " The Big Star",
"color": "8847ff"
},
{
"value": " Sneaky Blinder",
"color": "8847ff"
},
{
"value": " Justice Johns",
"color": "8847ff"
},
{
"value": " Crook's Cap",
"color": "8847ff"
},
{
"value": " The Tropical Brim",
"color": "8847ff"
},
{
"value": " Tanker's Top",
"color": "8847ff"
},
{
"value": " Scorched Earth Stompers",
"color": "8847ff"
},
{
"value": " The Brand Loyalist",
"color": "4b69ff"
},
{
"value": " Desk Engineer",
"color": "4b69ff"
},
{
"value": "✔ Daring Dell",
"color": "4b69ff"
},
{
"value": " Pathfinder",
"color": "4b69ff"
},
{
"value": " Brute's Braces",
"color": "4b69ff"
},
{
"value": " Watchmann's Wetsuit",
"color": "4b69ff"
},
{
"value": " The Aimframe",
"color": "4b69ff"
},
{
"value": " Commonwealth Commando",
"color": "4b69ff"
},
{
"value": " The Vaudeville Visor",
"color": "4b69ff"
},
{
"value": " Invisible Flame",
"color": "4b69ff"
},
{
"value": "\nTradable After: Wednesday, August 21, 2024 (7:00:00) GMT",
"color": "d83636"
}
],
"tradable": 0,
"actions": [
{
"link": "http:\/\/wiki.teamfortress.com\/scripts\/itemredirect.php?id=31445&lang=en_US",
"name": "Item Wiki Page..."
},
{
"link": "steam:\/\/rungame\/440\/76561202255233023\/+tf_econ_item_preview%20M4943349680812522251A%assetid%D11671989880544136045",
"name": "Inspect in Game..."
}
],
"name": "Strange Daring Dell",
"name_color": "CF6A32",
"type": "Strange Helmet - Points Scored: 0",
"market_name": "Strange Daring Dell",
"market_hash_name": "Strange Daring Dell",
"market_actions": [
{
"link": "steam:\/\/rungame\/440\/76561202255233023\/+tf_econ_item_preview%20M4943349680812522251A%assetid%D11671989880544136045",
"name": "Inspect in Game..."
}
],
"commodity": 0,
"market_tradable_restriction": 7,
"market_marketable_restriction": 0,
"marketable": 1,
"app_icon": "https:\/\/cdn.akamai.steamstatic.com\/steamcommunity\/public\/images\/apps\/440\/e3f595a92552da3d664ad00277fad2107345f743.jpg",
"owner": 0
},
"14788275372": {
"currency": 0,
"appid": 440,
"contextid": "2",
"id": "14788275372",
"classid": "6055499240",
"instanceid": "6108564972",
"amount": "1",
"status": 2,
"original_amount": "1",
"unowned_id": "14788275372",
"unowned_contextid": "2",
"background_color": "3C352E",
"icon_url": "fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEYeQpDCSTmuSpKhs_ZCfeABN8Tj8M54MFq1Td5lgQ1YrGwZDMwJgaQB6IOWfFvpV_uWSMzv5c7UIa1oLhUeg7v59TGYOV6M8YMQZcOCP3m-A",
"icon_url_large": "fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEYeQpDCSTmuSpKhs_ZCfeABN8Tj8M54MFq1Td5lgQ1YrGwZDMwJgaQB6IOWfFvpV_uWSMzv5c7UIa1oLhUeg7v59TGYOV6M8YMQZcOCP3m-A",
"descriptions": [
{
"value": "Mercenary Grade Helmet",
"color": "4b69ff"
},
{
"value": "Style: Streamlined",
"color": "756b5e"
},
{
"value": " "
},
{
"value": " "
},
{
"value": "Summer 2024 Cosmetics Collection"
},
{
"value": " Hazardous Environment Vest",
"color": "eb4b4b"
},
{
"value": " Botler 2000",
"color": "eb4b4b"
},
{
"value": " Control Patrol",
"color": "d32ce6"
},
{
"value": " Free Mann's Fashion",
"color": "d32ce6"
},
{
"value": " Fire Marshal",
"color": "d32ce6"
},
{
"value": " Tuxedo Royale",
"color": "d32ce6"
},
{
"value": " The Big Star",
"color": "8847ff"
},
{
"value": " Sneaky Blinder",
"color": "8847ff"
},
{
"value": " Justice Johns",
"color": "8847ff"
},
{
"value": " Crook's Cap",
"color": "8847ff"
},
{
"value": " The Tropical Brim",
"color": "8847ff"
},
{
"value": " Tanker's Top",
"color": "8847ff"
},
{
"value": " Scorched Earth Stompers",
"color": "8847ff"
},
{
"value": " The Brand Loyalist",
"color": "4b69ff"
},
{
"value": " Desk Engineer",
"color": "4b69ff"
},
{
"value": "✔ Daring Dell",
"color": "4b69ff"
},
{
"value": " Pathfinder",
"color": "4b69ff"
},
{
"value": " Brute's Braces",
"color": "4b69ff"
},
{
"value": " Watchmann's Wetsuit",
"color": "4b69ff"
},
{
"value": " The Aimframe",
"color": "4b69ff"
},
{
"value": " Commonwealth Commando",
"color": "4b69ff"
},
{
"value": " The Vaudeville Visor",
"color": "4b69ff"
},
{
"value": " Invisible Flame",
"color": "4b69ff"
},
{
"value": "\nTradable After: Wednesday, August 21, 2024 (7:00:00) GMT",
"color": "d83636"
}
],
"tradable": 0,
"actions": [
{
"link": "http:\/\/wiki.teamfortress.com\/scripts\/itemredirect.php?id=31445&lang=en_US",
"name": "Item Wiki Page..."
},
{
"link": "steam:\/\/rungame\/440\/76561202255233023\/+tf_econ_item_preview%20M4943349680812523061A%assetid%D419884080042862509",
"name": "Inspect in Game..."
}
],
"name": "Strange Daring Dell",
"name_color": "CF6A32",
"type": "Strange Helmet - Points Scored: 0",
"market_name": "Strange Daring Dell",
"market_hash_name": "Strange Daring Dell",
"market_actions": [
{
"link": "steam:\/\/rungame\/440\/76561202255233023\/+tf_econ_item_preview%20M4943349680812523061A%assetid%D419884080042862509",
"name": "Inspect in Game..."
}
],
"commodity": 0,
"market_tradable_restriction": 7,
"market_marketable_restriction": 0,
"marketable": 1,
"app_icon": "https:\/\/cdn.akamai.steamstatic.com\/steamcommunity\/public\/images\/apps\/440\/e3f595a92552da3d664ad00277fad2107345f743.jpg",
"owner": 0
}
}
},
"730": {
"2": {
"39122849598": {
"currency": 0,
"appid": 730,
"contextid": "2",
"id": "39122849598",
"classid": "6105767746",
"instanceid": "143865972",
"amount": "1",
"status": 0,
"original_amount": "1",
"background_color": "",
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXU5A1PIYQNqhpOSV-fRPasw8rsQEl9Jg9SpIW1KgRr7PDYeW8SvoiJl4iKm_vxPbzUhHgfsJAk0u-So4qs0Qfj8hVrN230II-SdFJoYljT-AS3kOa6h8K_vM_BzGwj5Hdm4fMLQA",
"descriptions": [
{
"type": "html",
"value": "This item commemorates the PGL Copenhagen 2024 CS2 Major Championship.",
"color": "ffd700"
},
{
"type": "html",
"value": " "
},
{
"type": "html",
"value": "This capsule contains a single Copenhagen 2024 Challengers participant Paper, Glitter, Holo, or Gold sticker.\n\n50% of the proceeds from the sale of this capsule support the included organizations.\n\nThat sticker can be applied to any weapon you own and can be scraped to look more worn. You can scrape the same sticker multiple times, making it a bit more worn each time, until it is removed from the weapon."
},
{
"type": "html",
"value": " "
},
{
"type": "html",
"value": "Container Series #399",
"color": "99ccff"
},
{
"type": "html",
"value": " "
},
{
"type": "html",
"value": "Sticker can represent one of the following organizations:"
},
{
"type": "html",
"value": "Cloud9 | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "ENCE | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "FURIA | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "Heroic | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "Eternal Fire | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "Apeks | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "GamerLegion | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "SAW | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "PGL | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": " "
},
{
"type": "html",
"value": "",
"color": "00a000"
}
],
"tradable": 0,
"owner_descriptions": [
{
"type": "html",
"value": " "
},
{
"type": "html",
"value": "Tradable After Aug 21, 2024 (7:00:00) GMT",
"color": "ff4040"
}
],
"name": "Copenhagen 2024 Challengers Sticker Capsule",
"name_color": "D2D2D2",
"type": "Base Grade Container",
"market_name": "Copenhagen 2024 Challengers Sticker Capsule",
"market_hash_name": "Copenhagen 2024 Challengers Sticker Capsule",
"commodity": 1,
"market_tradable_restriction": 7,
"marketable": 1,
"market_buy_country_restriction": "FR",
"app_icon": "https:\/\/cdn.akamai.steamstatic.com\/steamcommunity\/public\/images\/apps\/730\/8dbc71957312bbd3baea65848b545be9eae2a355.jpg",
"owner": 0
}
}
}
},
"start": 0,
"num_active_listings": 2,
"listings": [
{
"listingid": "4943349680812522251",
"time_created": 1723647027,
"asset": {
"currency": 0,
"appid": 440,
"contextid": "2",
"id": "14788276199",
"classid": "6055499240",
"instanceid": "6108294134",
"amount": "1",
"status": 2,
"original_amount": "1",
"unowned_id": "14788276199",
"unowned_contextid": "2",
"background_color": "3C352E",
"icon_url": "fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEYeQpDCSTmuSpKhs_ZCfeABN8Tj8M54MFq1Td5lgQ1YrGwZDMwJgaQB6IOWfFvpV_uWSMzv5c7UIa1oLhUeg7v59TGYOV6M8YMQZcOCP3m-A",
"icon_url_large": "fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEYeQpDCSTmuSpKhs_ZCfeABN8Tj8M54MFq1Td5lgQ1YrGwZDMwJgaQB6IOWfFvpV_uWSMzv5c7UIa1oLhUeg7v59TGYOV6M8YMQZcOCP3m-A",
"descriptions": [
{
"type": "text",
"value": "Mercenary Grade Helmet",
"color": "4b69ff"
},
{
"type": "text",
"value": "Style: Streamlined",
"color": "756b5e"
},
{
"type": "text",
"value": " "
},
{
"type": "text",
"value": " "
},
{
"type": "text",
"value": "Summer 2024 Cosmetics Collection"
},
{
"type": "text",
"value": " Hazardous Environment Vest",
"color": "eb4b4b"
},
{
"type": "text",
"value": " Botler 2000",
"color": "eb4b4b"
},
{
"type": "text",
"value": " Control Patrol",
"color": "d32ce6"
},
{
"type": "text",
"value": " Free Mann's Fashion",
"color": "d32ce6"
},
{
"type": "text",
"value": " Fire Marshal",
"color": "d32ce6"
},
{
"type": "text",
"value": " Tuxedo Royale",
"color": "d32ce6"
},
{
"type": "text",
"value": " The Big Star",
"color": "8847ff"
},
{
"type": "text",
"value": " Sneaky Blinder",
"color": "8847ff"
},
{
"type": "text",
"value": " Justice Johns",
"color": "8847ff"
},
{
"type": "text",
"value": " Crook's Cap",
"color": "8847ff"
},
{
"type": "text",
"value": " The Tropical Brim",
"color": "8847ff"
},
{
"type": "text",
"value": " Tanker's Top",
"color": "8847ff"
},
{
"type": "text",
"value": " Scorched Earth Stompers",
"color": "8847ff"
},
{
"type": "text",
"value": " The Brand Loyalist",
"color": "4b69ff"
},
{
"type": "text",
"value": " Desk Engineer",
"color": "4b69ff"
},
{
"type": "text",
"value": "✔ Daring Dell",
"color": "4b69ff"
},
{
"type": "text",
"value": " Pathfinder",
"color": "4b69ff"
},
{
"type": "text",
"value": " Brute's Braces",
"color": "4b69ff"
},
{
"type": "text",
"value": " Watchmann's Wetsuit",
"color": "4b69ff"
},
{
"type": "text",
"value": " The Aimframe",
"color": "4b69ff"
},
{
"type": "text",
"value": " Commonwealth Commando",
"color": "4b69ff"
},
{
"type": "text",
"value": " The Vaudeville Visor",
"color": "4b69ff"
},
{
"type": "text",
"value": " Invisible Flame",
"color": "4b69ff"
},
{
"type": "text",
"value": "\nTradable After: Wednesday, August 21, 2024 (7:00:00) GMT",
"color": "d83636"
}
],
"tradable": 0,
"actions": [
{
"link": "http:\/\/wiki.teamfortress.com\/scripts\/itemredirect.php?id=31445&lang=en_US",
"name": "Item Wiki Page..."
},
{
"link": "steam:\/\/rungame\/440\/76561202255233023\/+tf_econ_item_preview%20S%owner_steamid%A%assetid%D11671989880544136045",
"name": "Inspect in Game..."
}
],
"name": "Strange Daring Dell",
"name_color": "CF6A32",
"type": "Strange Helmet - Points Scored: 0",
"market_name": "Strange Daring Dell",
"market_hash_name": "Strange Daring Dell",
"market_actions": [
{
"link": "steam:\/\/rungame\/440\/76561202255233023\/+tf_econ_item_preview%20M%listingid%A%assetid%D11671989880544136045",
"name": "Inspect in Game..."
}
],
"commodity": 0,
"market_tradable_restriction": 7,
"market_marketable_restriction": 0,
"marketable": 1
},
"steamid_lister": "",
"price": 621,
"original_price": 621,
"fee": 93,
"currencyid": "2018",
"converted_price": 621,
"converted_fee": 93,
"converted_currencyid": "2018",
"status": 1,
"active": 1,
"steam_fee": 31,
"converted_steam_fee": 31,
"publisher_fee": 62,
"converted_publisher_fee": 62,
"publisher_fee_percent": "0.100000001490116119",
"publisher_fee_app": 440,
"cancel_reason": 0,
"item_expired": 0,
"original_amount_listed": 1,
"original_price_per_unit": 621,
"fee_per_unit": 93,
"steam_fee_per_unit": 31,
"publisher_fee_per_unit": 62,
"converted_price_per_unit": 621,
"converted_fee_per_unit": 93,
"converted_steam_fee_per_unit": 31,
"converted_publisher_fee_per_unit": 62,
"time_finish_hold": 0,
"time_created_str": "14 Aug"
},
{
"listingid": "4943349680812523061",
"time_created": 1723647033,
"asset": {
"currency": 0,
"appid": 440,
"contextid": "2",
"id": "14788275372",
"classid": "6055499240",
"instanceid": "6108564972",
"amount": "1",
"status": 2,
"original_amount": "1",
"unowned_id": "14788275372",
"unowned_contextid": "2",
"background_color": "3C352E",
"icon_url": "fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEYeQpDCSTmuSpKhs_ZCfeABN8Tj8M54MFq1Td5lgQ1YrGwZDMwJgaQB6IOWfFvpV_uWSMzv5c7UIa1oLhUeg7v59TGYOV6M8YMQZcOCP3m-A",
"icon_url_large": "fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEYeQpDCSTmuSpKhs_ZCfeABN8Tj8M54MFq1Td5lgQ1YrGwZDMwJgaQB6IOWfFvpV_uWSMzv5c7UIa1oLhUeg7v59TGYOV6M8YMQZcOCP3m-A",
"descriptions": [
{
"type": "text",
"value": "Mercenary Grade Helmet",
"color": "4b69ff"
},
{
"type": "text",
"value": "Style: Streamlined",
"color": "756b5e"
},
{
"type": "text",
"value": " "
},
{
"type": "text",
"value": " "
},
{
"type": "text",
"value": "Summer 2024 Cosmetics Collection"
},
{
"type": "text",
"value": " Hazardous Environment Vest",
"color": "eb4b4b"
},
{
"type": "text",
"value": " Botler 2000",
"color": "eb4b4b"
},
{
"type": "text",
"value": " Control Patrol",
"color": "d32ce6"
},
{
"type": "text",
"value": " Free Mann's Fashion",
"color": "d32ce6"
},
{
"type": "text",
"value": " Fire Marshal",
"color": "d32ce6"
},
{
"type": "text",
"value": " Tuxedo Royale",
"color": "d32ce6"
},
{
"type": "text",
"value": " The Big Star",
"color": "8847ff"
},
{
"type": "text",
"value": " Sneaky Blinder",
"color": "8847ff"
},
{
"type": "text",
"value": " Justice Johns",
"color": "8847ff"
},
{
"type": "text",
"value": " Crook's Cap",
"color": "8847ff"
},
{
"type": "text",
"value": " The Tropical Brim",
"color": "8847ff"
},
{
"type": "text",
"value": " Tanker's Top",
"color": "8847ff"
},
{
"type": "text",
"value": " Scorched Earth Stompers",
"color": "8847ff"
},
{
"type": "text",
"value": " The Brand Loyalist",
"color": "4b69ff"
},
{
"type": "text",
"value": " Desk Engineer",
"color": "4b69ff"
},
{
"type": "text",
"value": "✔ Daring Dell",
"color": "4b69ff"
},
{
"type": "text",
"value": " Pathfinder",
"color": "4b69ff"
},
{
"type": "text",
"value": " Brute's Braces",
"color": "4b69ff"
},
{
"type": "text",
"value": " Watchmann's Wetsuit",
"color": "4b69ff"
},
{
"type": "text",
"value": " The Aimframe",
"color": "4b69ff"
},
{
"type": "text",
"value": " Commonwealth Commando",
"color": "4b69ff"
},
{
"type": "text",
"value": " The Vaudeville Visor",
"color": "4b69ff"
},
{
"type": "text",
"value": " Invisible Flame",
"color": "4b69ff"
},
{
"type": "text",
"value": "\nTradable After: Wednesday, August 21, 2024 (7:00:00) GMT",
"color": "d83636"
}
],
"tradable": 0,
"actions": [
{
"link": "http:\/\/wiki.teamfortress.com\/scripts\/itemredirect.php?id=31445&lang=en_US",
"name": "Item Wiki Page..."
},
{
"link": "steam:\/\/rungame\/440\/76561202255233023\/+tf_econ_item_preview%20S%owner_steamid%A%assetid%D419884080042862509",
"name": "Inspect in Game..."
}
],
"name": "Strange Daring Dell",
"name_color": "CF6A32",
"type": "Strange Helmet - Points Scored: 0",
"market_name": "Strange Daring Dell",
"market_hash_name": "Strange Daring Dell",
"market_actions": [
{
"link": "steam:\/\/rungame\/440\/76561202255233023\/+tf_econ_item_preview%20M%listingid%A%assetid%D419884080042862509",
"name": "Inspect in Game..."
}
],
"commodity": 0,
"market_tradable_restriction": 7,
"market_marketable_restriction": 0,
"marketable": 1
},
"steamid_lister": "",
"price": 621,
"original_price": 621,
"fee": 93,
"currencyid": "2018",
"converted_price": 621,
"converted_fee": 93,
"converted_currencyid": "2018",
"status": 1,
"active": 1,
"steam_fee": 31,
"converted_steam_fee": 31,
"publisher_fee": 62,
"converted_publisher_fee": 62,
"publisher_fee_percent": "0.100000001490116119",
"publisher_fee_app": 440,
"cancel_reason": 0,
"item_expired": 0,
"original_amount_listed": 1,
"original_price_per_unit": 621,
"fee_per_unit": 93,
"steam_fee_per_unit": 31,
"publisher_fee_per_unit": 62,
"converted_price_per_unit": 621,
"converted_fee_per_unit": 93,
"converted_steam_fee_per_unit": 31,
"converted_publisher_fee_per_unit": 62,
"time_finish_hold": 0,
"time_created_str": "14 Aug"
}
],
"listings_on_hold": [],
"listings_to_confirm": [
{
"listingid": "4943349680812547001",
"time_created": 1723647248,
"asset": {
"currency": 0,
"appid": 730,
"contextid": "2",
"id": "39122849598",
"classid": "6105767746",
"instanceid": "143865972",
"amount": "1",
"status": 0,
"original_amount": "1",
"background_color": "",
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXU5A1PIYQNqhpOSV-fRPasw8rsQEl9Jg9SpIW1KgRr7PDYeW8SvoiJl4iKm_vxPbzUhHgfsJAk0u-So4qs0Qfj8hVrN230II-SdFJoYljT-AS3kOa6h8K_vM_BzGwj5Hdm4fMLQA",
"icon_url_large": "",
"descriptions": [
{
"type": "html",
"value": "This item commemorates the PGL Copenhagen 2024 CS2 Major Championship.",
"color": "ffd700"
},
{
"type": "html",
"value": " "
},
{
"type": "html",
"value": "This capsule contains a single Copenhagen 2024 Challengers participant Paper, Glitter, Holo, or Gold sticker.\n\n50% of the proceeds from the sale of this capsule support the included organizations.\n\nThat sticker can be applied to any weapon you own and can be scraped to look more worn. You can scrape the same sticker multiple times, making it a bit more worn each time, until it is removed from the weapon."
},
{
"type": "html",
"value": " "
},
{
"type": "html",
"value": "Container Series #399",
"color": "99ccff"
},
{
"type": "html",
"value": " "
},
{
"type": "html",
"value": "Sticker can represent one of the following organizations:"
},
{
"type": "html",
"value": "Cloud9 | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "ENCE | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "FURIA | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "Heroic | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "Eternal Fire | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "Apeks | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "GamerLegion | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "SAW | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": "PGL | Copenhagen 2024",
"color": "b0c3d9"
},
{
"type": "html",
"value": " "
},
{
"type": "html",
"value": "",
"color": "00a000"
}
],
"tradable": 0,
"owner_descriptions": [
{
"type": "html",
"value": " "
},
{
"type": "html",
"value": "Tradable After Aug 21, 2024 (7:00:00) GMT",
"color": "ff4040"
}
],
"name": "Copenhagen 2024 Challengers Sticker Capsule",
"name_color": "D2D2D2",
"type": "Base Grade Container",
"market_name": "Copenhagen 2024 Challengers Sticker Capsule",
"market_hash_name": "Copenhagen 2024 Challengers Sticker Capsule",
"commodity": 1,
"market_tradable_restriction": 7,
"marketable": 1,
"market_buy_country_restriction": "FR"
},
"steamid_lister": "",
"price": 869566,
"original_price": 869566,
"fee": 130434,
"currencyid": "2018",
"converted_price": 869566,
"converted_fee": 130434,
"converted_currencyid": "2018",
"status": 17,
"active": 0,
"steam_fee": 43478,
"converted_steam_fee": 43478,
"publisher_fee": 86956,
"converted_publisher_fee": 86956,
"publisher_fee_percent": "0.100000001490116119",
"publisher_fee_app": 730,
"cancel_reason": 0,
"item_expired": 0,
"original_amount_listed": 1,
"original_price_per_unit": 869566,
"fee_per_unit": 130434,
"steam_fee_per_unit": 43478,
"publisher_fee_per_unit": 86956,
"converted_price_per_unit": 869566,
"converted_fee_per_unit": 130434,
"converted_steam_fee_per_unit": 43478,
"converted_publisher_fee_per_unit": 86956,
"time_finish_hold": 0,
"time_created_str": "14 Aug"
}
],
"buy_orders": [
{
"appid": 730,
"hash_name": "Sticker | sdy (Holo) | Paris 2023",
"wallet_currency": 18,
"price": "1500",
"quantity": "10",
"quantity_remaining": "10",
"buy_orderid": "6094343235",
"description": {
"appid": 730,
"classid": "5316865559",
"instanceid": "0",
"currency": 0,
"background_color": "",
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulRNTV7ZVLb9hZycQFRzGhdTr4WtJAtvnfaZKWkQv4nmwNbSzvX2Y-uIwG1Qu5Vzju3FpYmmigXjrhVoZzincoeLMlhpQRnzRZg",
"icon_url_large": "",
"descriptions": [
{
"type": "html",
"value": "This item commemorates the BLAST.tv Paris 2023 CS:GO Championship.",
"color": "ffd700",
"label": null
},
{
"type": "html",
"value": " ",
"color": null,
"label": null
},
{
"type": "html",
"value": "This sticker can be applied to any weapon you own and can be scraped to look more worn. You can scrape the same sticker multiple times, making it a bit more worn each time, until it is removed from the weapon.",
"color": null,
"label": null
},
{
"type": "html",
"value": " ",
"color": null,
"label": null
},
{
"type": "html",
"value": "This holographic sticker was autographed by professional player Viktor Orudzhev playing for Monte at the BLAST.tv Paris 2023 CS:GO Major Championship.",
"color": null,
"label": null
},
{
"type": "html",
"value": " ",
"color": null,
"label": null
},
{
"type": "html",
"value": "",
"color": "00a000",
"label": null
}
],
"tradable": 1,
"actions": [
{
"link": "steam:\/\/rungame\/730\/76561202255233023\/+csgo_econ_action_preview%20S%owner_steamid%A%assetid%D11838432360356985897",
"name": "Inspect in Game..."
}
],
"owner_descriptions": [],
"owner_actions": [],
"fraudwarnings": [],
"name": "Sticker | sdy (Holo) | Paris 2023",
"name_color": "D2D2D2",
"type": "Exotic Sticker",
"market_name": "Sticker | sdy (Holo) | Paris 2023",
"market_hash_name": "Sticker | sdy (Holo) | Paris 2023",
"market_fee": null,
"market_fee_app": null,
"contained_item": null,
"market_actions": [
{
"link": "steam:\/\/rungame\/730\/76561202255233023\/+csgo_econ_action_preview%20M%listingid%A%assetid%D11838432360356985897",
"name": "Inspect in Game..."
}
],
"commodity": 1,
"market_tradable_restriction": 7,
"market_marketable_restriction": null,
"marketable": 1,
"tags": [],
"item_expiration": null,
"market_buy_country_restriction": null,
"market_sell_country_restriction": null
}
}
@yesworId , I see, very nice! I need to make one commit before we can fix this.
@yesworId , thanks for participating! Finally got it working
Initial Checks
Description
If you have none listed items, Rendered listings response will return:
Where we can see that assets list is empty.
Later on in _parse_item_descriptions_for_listings method we use assets list (which is empty) and trying to call method 'items':
I just roughly looked around code and made this small fix by adding if operator (highlighted in the code). I didn't analyze how code works in deep.
Steps To Reproduce
Environment
Additional Information
No response