GithubHelp home page GithubHelp logo

animal-crossing-scraper's Introduction

animal-crossing-scraper

Python webscraper to extract various data of the game Animal Crossing - New Horizons.

Data source: https://animalcrossing.fandom.com/wiki/

Feel free to use the JSON files! Some of the pages on the wiki are incomplete, so if some data is missing please check back later.

Output

All JSON files are stored in /data

-- Completed --
/museums

  • bugs.json
  • fish.json
  • fossils.json
  • artwork.json

/characters

  • villagers.json

/flowers

  • availability.json
  • genetics_others.json
  • genetics_rose.json
  • hybridization_advanced.json
  • hybridization_simple.json

/music

-- Incomplete --
/crafting

  • tools.json
  • equipments.json
  • housewares.json
  • miscellaneous.json
  • wallMounteds.json
  • wallpaperRugsFloorings.json
  • others.json

/clothing

  • tops.json
  • bottoms.json
  • dresses.json
  • hats.json
  • accessories.json
  • socks.json
  • shoes.json
  • bags.json
  • umbrellas.json

JSON fields

Price: -1 indicates the data is not available yet.

Set Up

  1. In the animal-crossing-scraper root directory, clone the project using
git clone https://github.com/sungyeonu/animal-crossing-scraper.git
  1. Set up a virtual environment
python -m venv venv
  1. Activate the virtual environment
  • Windows: venv\Scripts\activate
  • Linux/Mac: source venv/bin/activate
  1. Install required packages
pip install -r requirements.txt

Usage

To run:

python scrapy.py

To test:

python test_scrapy.py

animal-crossing-scraper's People

Contributors

antriver avatar bendikjohansen avatar ma-ve avatar sungyeonu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

animal-crossing-scraper's Issues

Critter object key error

I saw that the the critter objects has dashes as the monthKey.
"seasons-northern-hemisphere"
Can you change it to underscores? Because some programming languages has problems when array/object key has dash in it.

Missing data on villlagers

  • home_request: ['Admiral', 'Audie', 'Bea', 'Billy', 'Biskit', 'Boots', 'Boris', 'Boyd', 'Buzz', 'Candi', 'Cashmere', 'Chester', 'Claudia', 'Cleo', 'Cyd', 'Dobie', 'Dom', 'Ellie', 'Gonzo', 'Hopkins', 'Hornsby', 'Huck', 'Ike', 'Jacob', 'Judy', 'Julia', 'June', 'Ketchup', 'Leopold', 'Lily', 'Megan', 'Mott', 'Murphy', 'Nibbles', 'Norma', 'Olive', 'Paolo', 'Peewee', 'Piper', 'Plucky', 'Raddle', 'Raymond', 'Reneigh', 'Rex', 'Rory', 'Sandy', 'Shep', 'Sherb', 'Snooty', 'Spike', 'Sprocket', 'Stella', 'Stu', 'Sylvana', 'Tad', 'Tammi', 'Tank', 'Tasha', 'Tybalt', 'Ursala', 'Vivian', 'Wade', 'Weber', 'Zucker']

  • goal: ['Biskit', 'Dobie', 'Lily']

  • skill: ['Biskit', 'Dobie', 'Lily']

  • coffee: ['Biskit', 'Dobie', 'Lily']

  • initial_clothes: ['Dobie', 'Lily']

  • initial_phrase: ['Dobie']

  • favorite_song: ['Biskit', 'Dobie', 'Lily', 'Louie', 'Paolo', 'Spike']

  • style: ['Admiral', 'Bea', 'Billy', 'Biskit', 'Boots', 'Boris', 'Boyd', 'Buzz', 'Carrie', 'Cashmere', 'Claude', 'Cleo', 'Dobie', 'Ellie', 'Gonzo', 'Hornsby', 'Huck', 'Jacob', 'Julia', 'June', 'Ketchup', 'Leopold', 'Lily', 'Maddie', 'Maggie', 'Murphy', 'Norma', 'Paolo', 'Piper', 'Plucky', 'Raddle', 'Sandy', 'Sherb', 'Spike', 'Sprocket', 'Stella', 'Stu', 'Sylvana', 'Tad', 'Tasha', 'Tybalt', 'Ursala', 'Wade', 'Weber']

  • appearance: ['Biskit', 'Dobie', 'Lily']

  • birthday: ['Dobie']

  • species: ['Dobie']

Villagers such as Dom and Judy with field values = null are not included.

Bug: Missing villager images

For Spork and Jacob the image url is missing.
There is only /wiki/Crackle and /wiki/Jacob in the json as the url.

Group variations and materials and their imageLinks

I think these two data fields should be paired, something like this:

"variations": [
"Black",
"Red",
],
"variationImageLinks": [
"https://vignette.wikia.nocookie.net/animalcrossing/images/e/e2/NH-Tops-Silk_shirt_4.png/revision/latest/scale-to-width-down/50?cb=20200414145617",
"https://vignette.wikia.nocookie.net/animalcrossing/images/e/e7/NH-Tops-Silk_shirt_1.png/revision/latest/scale-to-width-down/50?cb=20200414145454",
],

to

"variations": [{
"color": "black",
"imageLink": "https://vignette.wikia.nocookie.net/animalcrossing/images/e/e2/NH-Tops-Silk_shirt_4.png/revision/latest/scale-to-width-down/50?cb=20200414145617",
},
.
.
.

Create testing

Create unit tests for DIY page, fish, bugs, and fossils. Manually grab test data from wikis (maybe first two objects for each category)

Add full-size-image, catch-phrase, museum-phrase to fish and bugs?

Example: https://animalcrossing.fandom.com/wiki/Bitterling

  • catch-phrase: "I caught a bitterling! It's mad at me, but only a little."

  • museum-phrase: "Bitterlings hide their eggs inside large bivalves—like clams—where the young can stay safe until grown. The bitterling isn't being sneaky. No, their young help keep the bivalve healthy by eating invading parasites! It's a wonderful bit of evolutionary deal making, don't you think? Each one keeping the other safe... Though eating parasites does not sound like a happy childhood... Is that why the fish is so bitter?"

  • full-size-image: https://vignette.wikia.nocookie.net/animalcrossing/images/e/e9/Nh-bitterling.jpg/revision/latest?cb=20200331062501

acnhapi.com uses image and icon to seperate the two images. Currently this repo only scrapes the icon. Also, the full-size-image on animal crossing.fandom has a background color while acnhapi.com offers the full-size-image like https://acnhapi.com/v1/images/fish/1 without background colors.

Bug Report: DIY items with broken imageLink

I tried several images in the DIY jsons, but for every try I got the "broken image" image as the result
For example this is the "Ironwood DIY Workbench"'s image: https://vignette.wikia.nocookie.net/animalcrossing/images/2/2e/NH-Ironwood_DIY_workbench.png/revision/latest?cb=20200329061925

Update request: Use the original image link without the downscale tag

In some pages there's a downscale query in the image url, for example on DIY pages materials section:
https://vignette.wikia.nocookie.net/animalcrossing/images/d/d4/NH-acorn_icon.png/revision/latest/scale-to-width-down/18?cb=20200407141759
There the part /scale-to-width-down/18 downscales the acorn icon to a small 18x18 icon. If you skip that part of the URL you'll got the original image.

As I saw this tag is used on the DIY page at the materials part and on the villagers page at the villager images, but maybe they're used at other places at well.

Feature request: scraping of recipes

Heya!

I could really use recipes in a proper format -- however, animalcrossing.fandom.com doesn't make it easy.

They have an incomplete list at https://animalcrossing.fandom.com/wiki/DIY_recipes (and sub categories). But, event wise, for the Cherry-blossom season event, this one is complete:

https://animalcrossing.fandom.com/wiki/Cherry-blossom_petal

Then again, the Bunny Day recipes are available at https://animalcrossing.fandom.com/wiki/DIY_recipes/Housewares, but only if you look for a [a-zA-Z0-9] egg.

I've found no other website that has a properly formatted list of differing event recipes.

In any case, is there any use for this, in this repo? Maybe just scrape the DIY_recipes page?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.