All Projects → fedecalendino → Nintendeals

fedecalendino / Nintendeals

Licence: mit
Library with a set of tools for scraping information about Nintendo games and its prices across all regions (NA, EU and JP).

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Nintendeals

Jksv
Data Tool For Switch
Stars: ✭ 388 (+312.77%)
Mutual labels:  nintendo, nintendo-switch
Pimiibo
A tool to create your own amiibo!
Stars: ✭ 92 (-2.13%)
Mutual labels:  nintendo, nintendo-switch
Nxloader
My first Android app: Launch Fusée Gelée payloads from stock Android (CVE-2018-6242)
Stars: ✭ 417 (+343.62%)
Mutual labels:  nintendo, nintendo-switch
Road To Yuzu Without Switch
This Repo explains how to install the Yuzu Switch Emulator without a Switch
Stars: ✭ 267 (+184.04%)
Mutual labels:  nintendo, nintendo-switch
Sys Clk Editor
Editor for your sys-clk configuration!
Stars: ✭ 89 (-5.32%)
Mutual labels:  nintendo, nintendo-switch
Socialreaper
Social media scraping / data collection library for Facebook, Twitter, Reddit, YouTube, Pinterest, and Tumblr APIs
Stars: ✭ 338 (+259.57%)
Mutual labels:  scraping, reddit
Nintendo Switch Eshop
Crawler for Nintendo Switch eShop
Stars: ✭ 463 (+392.55%)
Mutual labels:  nintendo, nintendo-switch
Nintendo-Switch-JoyCon-Hack
Hardwiring a push button in a JoyCon to grant bootloader access
Stars: ✭ 44 (-53.19%)
Mutual labels:  nintendo, nintendo-switch
Hydrosphere
Ocean beyond the Horizon
Stars: ✭ 17 (-81.91%)
Mutual labels:  nintendo, nintendo-switch
Nx Shell
A multi-purpose file manager for the Nintendo Switch.
Stars: ✭ 639 (+579.79%)
Mutual labels:  nintendo, nintendo-switch
byml-v2
Nintendo BYML or BYAML parser, writer and converter. Fully supports Breath of the Wild and Super Mario Odyssey files.
Stars: ✭ 23 (-75.53%)
Mutual labels:  nintendo, nintendo-switch
Splatoon 2 Meme Mod
Splatoon 2 mod about memes.
Stars: ✭ 11 (-88.3%)
Mutual labels:  nintendo, nintendo-switch
switch joy con as mouse for macos
Tool to use Nintendo Switch Joy-Con as a mouse for macOS
Stars: ✭ 19 (-79.79%)
Mutual labels:  nintendo, nintendo-switch
Sxos Cheatdb
This is a collection of cheat codes for use with Team Xecuter's SXOS CFW on Nintendo Switch
Stars: ✭ 352 (+274.47%)
Mutual labels:  nintendo, nintendo-switch
FCEUX-Lua-Script-Collection
Lua scripts for FCEUX (an NES emulator). Multiple games including River City Ransom, Battle Kid
Stars: ✭ 20 (-78.72%)
Mutual labels:  games, nintendo
Rekado
Payload launcher and serial number checker for Nintendo Switch
Stars: ✭ 455 (+384.04%)
Mutual labels:  nintendo, nintendo-switch
eshop-api-wrapper
API Wrapper to get information from Nintendo Eshop.
Stars: ✭ 24 (-74.47%)
Mutual labels:  nintendo, nintendo-switch
Homebrew-Guide
Guide for getting CFW setup on your Nintendo Switch (And Wii U)
Stars: ✭ 104 (+10.64%)
Mutual labels:  nintendo, nintendo-switch
Deepsea
The new All-in-One CFW package for the Nintendo Switch.
Stars: ✭ 488 (+419.15%)
Mutual labels:  nintendo, nintendo-switch
Vba M Nx
WIP full featured port of VBA-M for Nintendo Switch
Stars: ✭ 11 (-88.3%)
Mutual labels:  nintendo, nintendo-switch

nintendeals

"nintendeals was a bot, he loved learning and deals on nintendo's eshop." LetsFunHans 💬️

Version Quality Gate Status CodeCoverage


Named after the my old reddit bot, nintendeals is now a library with all the scrapers and integrations of nintendo services that I used.

Terminology

Before getting into any details first we need too get into the same page with a few terms:

Region

Here we have three regions NA, EU and JP each one corresponding to Nintendo of America (NoA), Nintendo of Europe (NoE) and Nintendo of Japan (NoJ). Each of these regions have set of countries they are "in charge of":

NoA:

  • Canada
  • Mexico
  • United Stated

NoE:

  • Every country in the European Union
  • Australia
  • New Zealand
  • South Africa

NoJ:

  • Japan

nsuid

An nsuid is a 14 digit long string which Nintendo uses to identify games on each region. Taking Breath of the Wild as an example, we have these 3 nsuids for it (one per region):

  * 70010000000025 (NA)
  * 70010000000023 (EU)
  * 70010000000026 (JP)

Product Code

The product code is another type of ID that Nintendo uses, it usually is a 8/9 character long string. Taking Splatoon 2 as an example, we have these 3 product codes for it (one per region):

  * HACPAAB6B (NA)
  * HACPAAB6C (EU)
  *  HACAAB6A (JP)

The difference with the nsuid is that the product code has a constant between all regions (AAB6 in this example), and this is what I decided to call unique_id and it is what we can you to join a game across all regions.

You can also see this code in the front of your Nintendo Switch cartridge.

Services

This library provides three types of services: Info, Listing, Searching and Pricing. Each region has a different version of Info, Listing and Searching, but Pricing is the same for all as it only requires a country and an nsuid.

Listing

Even thought there are different version for each region, they all work in the same way. Given a supported platform (for this library) they will retrieve a list games in the selected region (in the form of an iterator).

from nintendeals import noa

for game in noa.list_switch_games():
    print(game.title, "/", game.nsuid)
>> ARMS / 70010000000392
>> Astro Duel Deluxe / 70010000000301
>> Axiom Verge / 70010000000821
>> Azure Striker GUNVOLT: STRIKER PACK / 70010000000645
>> Beach Buggy Racing / 70010000000721
from nintendeals import noe

for game in noe.list_switch_games():
    print(game.title, "/", game.nsuid)
>> I and Me / 70010000000314
>> In Between / 70010000009184
>> Ghost 1.0 / 70010000001386
>> Resident Evil 0 / 70010000012848
>> 64.0 / 70010000020867

Searching

Built on top of the listing services, these provide a simple way to search for games by title or release_date:

from nintendeals import noa

for game in noa.search_switch_games(query="Zelda"):
    print(game.title, "/", game.nsuid)
>> The Legend of Zelda™: Link’s Awakening / 70010000020033
>> The Legend of Zelda™: Link's Awakening: Dreamer Edition / None
>> Cadence of Hyrule: Crypt of the NecroDancer Featuring The Legend of Zelda / 70010000021364
>> The Legend of Zelda™: Breath of the Wild / 70010000000025

Info

Once you have the nsuid of the game that you want, you can call the game_info service. And again, each region has their own version but they all work the same, but keep in mind that you need to use the correct nsuid for each region. Coming back to the nsuid of Breath of the Wild as an example:

from nintendeals import noa

game = noa.game_info("70010000000025")
print(game.title)
print(game.product_code, game.unique_id)
print(game.release_date)
print(game.players)
print(str(game.rating[0]), game.rating[1])
print(game.eshop.ca_fr)

for feature, value in game.features.items():
    print(" *", str(feature), ":", value)
>> The Legend of Zelda™: Breath of the Wild
>> HACPAAAAA AAAA
>> 2017-03-03 00:00:00
>> 1
>> ESRB Everyone 10+
>> https://www.nintendo.com/fr_CA/games/detail/the-legend-of-zelda-breath-of-the-wild-switch
>>  * Demo Available : False
>>  * DLC Available : False
>>  * Nintendo Switch Online Required : True
>>  * Save Data Cloud Supported : True
from nintendeals import noe

game = noe.game_info("70010000000023")
print(game.title)
print(game.product_code, game.unique_id)
print(game.release_date)
print(game.players)
print(str(game.rating[0]), game.rating[1])
print(game.eshop.uk_en)

for feature, value in game.features.items():
    print(" *", str(feature), ":", value)
>> The Legend of Zelda: Breath of the Wild
>> HACPAAAAA AAAA
>> 2017-03-03 00:00:00
>> 1
>> PEGI 12
>> https://www.nintendo.co.uk/Games/Nintendo-Switch/The-Legend-of-Zelda-Breath-of-the-Wild-1173609.html
>>  * Amiibo Supported : True
>>  * Demo Available : False
>>  * DLC Available : False
>>  * Nintendo Switch Online Required : False
>>  * Save Data Cloud Supported : True
>>  * Voice Chat Supported : False
from nintendeals import noj

game = noj.game_info("70010000000026")
print(game.title)
print(game.product_code, game.unique_id)
print(game.release_date)
print(game.players)
print(str(game.rating[0]), game.rating[1])
print(game.eshop.jp_jp)

for feature, value in game.features.items():
    print(" *", str(feature), ":", value)
>> ゼルダの伝説 ブレス オブ ザ ワイルド
>> HACAAAAA AAAA
>> 2017-03-03 00:00:00
>> 1
>> CERO B
>> https://store-jp.nintendo.com/list/software/70010000000026.html
>>  * Amiibo Supported : True
>>  * DLC Available : True
>>  * Nintendo Switch Online Required : False

Pricing

Given a country code (using the alpha-2 iso standard) and a game or list of games this service will fetch the current pricing of that/those games for that country. Since this service uses nsuids to fetch the price, make sure that the games that you provide have the regional nsuid that matches the country that you want. For example, only the nsuid for the American region will be able to fetch you the prices of Canada, Mexico and United Stated but not for Japan or Spain.

from nintendeals import noe
from nintendeals.api import prices

game = noe.game_info("70010000007705")
print(game.title)
print()

price = prices.get_price(game, country="CZ")  # Czech Republic
print(price.currency)
print(price.value)
print(price.sale_discount, "%")
print(price.sale_value)
print(price.sale_start)
print(price.sale_end)

# Alternatively you can do this for the same effect:
price = game.price(country="CZ") 
Dead Cells

CZK
625.0
80 %
500.0
2020-04-19 22:00:00
2020-05-03 21:59:59

To reduce the amount of call to the prices api, you can also use the get_prices service that works in a similar way but it expects a list of games instead of only one:

from nintendeals import noa
from nintendeals.api import prices

botw = noa.game_info("70010000000025")
print(botw.title)
celeste = noa.game_info("70010000006442")
print(celeste.title)

print()

prices = prices.get_prices([botw, celeste], country="US")
for nsuid, price in prices:
    print(nsuid)
    print(price.value)
    print(price.sale_value)
    print()
The Legend of Zelda™: Breath of the Wild
Celeste

70010000000025
59.99
None

70010000006442
19.99
4.99
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].