{"id":2365,"date":"2024-02-20T11:20:00","date_gmt":"2024-02-20T11:20:00","guid":{"rendered":"https:\/\/www.jameshatton.co.uk\/blog\/?p=2365"},"modified":"2024-02-28T00:19:06","modified_gmt":"2024-02-28T00:19:06","slug":"xbox-discounts-as-csv-file","status":"publish","type":"post","link":"https:\/\/www.jameshatton.co.uk\/blog\/2024\/02\/20\/xbox-discounts-as-csv-file\/","title":{"rendered":"Xbox Discounts as CSV File"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I own a fair old number of Xbox games so when the weekly or special sales come about I need a quick way to see which titles would interest me. I wrote a small Python program to aid me.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">When I say &#8216;fair old number&#8217;, I mean that I have a few thousand games (digital and physical) across the Xbox, Wii U and PC platforms. While I enjoy playing video games, I&#8217;m not a collector and so I don&#8217;t particular derive satisfaction from organising my library &#8211; it&#8217;s just a necessity. I track my games on <a href=\"https:\/\/rawg.io\/@retrojimmyx\/games\" target=\"_blank\" rel=\"noreferrer noopener\">rawg.io<\/a> but I need a method to manage the few hundred titles that may appear in the weekly or special event Xbox sales.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Video games are expensive (they always have been really) so a list helps me avoid buying the same game twice (different editions or on different platforms) or is a way I can wishlist items for when I don&#8217;t have to pay the early adopter premium. I will happily play games released over the last decade so the sales are great for me but even if I spent just one minute looking at a title, when Xbox release 800 titles with discounts, that would take me a day to go through.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s my lo-fi solution. I just build up a spreadsheet of game titles. If I haven&#8217;t come across a title before, I&#8217;ll look at its store page, reviews etc. and decide if I want it. I classify titles as<br>1: Definitely buy, 2: Maybe buy, 3: Wait for lower Price 4: Don&#8217;t buy, 5: On Game Pass 6: Already Own<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"491\" data-attachment-id=\"2367\" data-permalink=\"https:\/\/www.jameshatton.co.uk\/blog\/2024\/02\/20\/xbox-discounts-as-csv-file\/xboxgamessheet\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xboxgamessheet.png?fit=1126%2C658&amp;ssl=1\" data-orig-size=\"1126,658\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"xboxgamessheet\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xboxgamessheet.png?fit=840%2C491&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xboxgamessheet.png?resize=840%2C491&#038;ssl=1\" alt=\"\" class=\"wp-image-2367\" srcset=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xboxgamessheet.png?resize=1024%2C598&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xboxgamessheet.png?resize=300%2C175&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xboxgamessheet.png?resize=768%2C449&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xboxgamessheet.png?w=1126&amp;ssl=1 1126w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As this list grows (currently there&#8217;s over 6,000 titles) then each new batch in the sales can quickly get sorted against it (using vlookups). So basically, when there were a few hundred games in the Christmas sales it took only seconds to weed out the games I don&#8217;t want to buy, already own or are available on Game Pass. Perfect so then I just spent an hour looking at those I may be interested in.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But I need to get the games in a format I can work with. Fortunately the website <a href=\"https:\/\/www.xbox-now.com\" target=\"_blank\" rel=\"noreferrer noopener\">xbox-now.com<\/a> lists all the current Xbox discounts via their <a href=\"https:\/\/www.xbox-now.com\/en\/deal-list\" target=\"_blank\" rel=\"noreferrer noopener\">deal list<\/a> as below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"546\" data-attachment-id=\"2368\" data-permalink=\"https:\/\/www.jameshatton.co.uk\/blog\/2024\/02\/20\/xbox-discounts-as-csv-file\/xbox-now\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-now.png?fit=1146%2C744&amp;ssl=1\" data-orig-size=\"1146,744\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"xbox-now\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-now.png?fit=840%2C546&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-now.png?resize=840%2C546&#038;ssl=1\" alt=\"\" class=\"wp-image-2368\" srcset=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-now.png?resize=1024%2C665&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-now.png?resize=300%2C195&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-now.png?resize=768%2C499&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-now.png?w=1146&amp;ssl=1 1146w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I copy this information by highlighting the text of the last listing, holding shift and highlighting text of the first listing (so it highlights all the listings) and then I copy it (CTRL+C) and past into Notepad (CTRL+V) to get rid of any non-text elements. The result looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"578\" data-attachment-id=\"2369\" data-permalink=\"https:\/\/www.jameshatton.co.uk\/blog\/2024\/02\/20\/xbox-discounts-as-csv-file\/xbox-games-raw\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-games-raw.png?fit=842%2C579&amp;ssl=1\" data-orig-size=\"842,579\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"xbox-games-raw\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-games-raw.png?fit=840%2C578&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-games-raw.png?resize=840%2C578&#038;ssl=1\" alt=\"\" class=\"wp-image-2369\" srcset=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-games-raw.png?w=842&amp;ssl=1 842w, https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-games-raw.png?resize=300%2C206&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-games-raw.png?resize=768%2C528&amp;ssl=1 768w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This data is messy so I need another method of converting this list of fields into something I can easily import into Excel. I wrote a <span style=\"text-decoration: underline;\">small<\/span> Python program to convert this data into a list of comma-separated values (CSV). Not only has the program &#8216;grown organically&#8217; but it changes often because xbox-now.com seem to regularly change how they present the data. Nevertheless, it may be useful for someone \ud83d\ude09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here it is:<\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/trinket.io\/embed\/python\/031c896d9f?showInstructions=true\" width=\"100%\" height=\"600\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" allowfullscreen><\/iframe>\n\n\n\n<p class=\"wp-block-paragraph\">Steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Visit\u00a0<a href=\"https:\/\/www.xbox-now.com\/en\/deal-list\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.xbox-now.com\/en\/deal-list<\/a>\u00a0in a regular web browser.<\/li>\n\n\n\n<li>Ensure filters are used and the currency settings are correct for GBP.<\/li>\n\n\n\n<li>Highlight the bottom listing, hold Shift and highlight the top listing and then copy (CTRL+C) to clipboard.<\/li>\n\n\n\n<li>Paste into the PasteHere of the embedded Python trinket above  tab and run the program.<\/li>\n\n\n\n<li>Save the output in export.csv tab to your computer.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>I own a fair old number of Xbox games so when the weekly or special sales come about I need a quick way to see which titles would interest me. I wrote a small Python program to aid me.<\/p>\n","protected":false},"author":1,"featured_media":2366,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[92,20],"tags":[27,78],"class_list":["post-2365","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gaming","category-stem","tag-gaming","tag-programming"],"featured_image_src":"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-latte.jpg?fit=360%2C240&ssl=1","author_info":{"display_name":"james","author_link":"https:\/\/www.jameshatton.co.uk\/blog\/author\/james\/"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2024\/02\/xbox-latte.jpg?fit=360%2C240&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p89zH1-C9","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2365","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=2365"}],"version-history":[{"count":3,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2365\/revisions"}],"predecessor-version":[{"id":2372,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2365\/revisions\/2372"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/media\/2366"}],"wp:attachment":[{"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=2365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=2365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=2365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}