Giter Site home page Giter Site logo

navbryce / warship-scraper Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2.37 MB

Scrapes warship data from Wikipedia and calcuates stats about the ships

Home Page: https://warshipstats.netlify.app

Python 83.52% Shell 0.06% JavaScript 15.41% Dockerfile 1.01%

warship-scraper's Introduction

Warship Scraper

Scrapes warship information from Wikipedia. Because all the information is user-sourced, most formatting is not consistent Wikipedia-page to page, making the task awkward. The scraper also calculates various stats about the ships and a similarity score between all the ships.

Background

I coded this app in 2017, while I was in high school. As a result, the code is not very idiomatic. Around 2020, it stopped working because the database was deleted and the stack was growing unsupported. In 2022, I switched to poetry for dependency management, packaged the app in Docker, and allocated a new database on Mongo Atlas, so I could re-deploy it on Heroku. Any of the changes I made in 2022 were deployment-related (and I didn't change the core of the projectt).

Stack

  • Python (Scraper)
  • Poetry
  • Node.js and Express (HTTP API)
  • MongoDB

Demo

See the frontend's repo to access the demo

warship-scraper's People

Contributors

navbryce avatar

Stargazers

 avatar

Watchers

 avatar

warship-scraper's Issues

Fill-in Information

Some ships have information that is missing. The scraper should attempt to find this information through its class or a sister-ship.

[Important] Error Checking

After scraping a ship, check for errors and verify the ship was scraped successfully before saving it to the database.

Date Range Problem

Dates in the format of {{year}}-{{other year}} will throw an error. Usually associated with "in-commission" property of ship.

Image Problems

  • Weird caption on thumbnail image

  • Wikipedia images have two sizes. Currently scrapes the smaller size. Should scrape both.

Nationality

Scrape ship's nationality and draw edge if two ships share a nationality.

Units with no Spaces

The scraper can't handle values in the following format: "{{value}}{{unit}}". Note: no space between value and unit.

Unit Conversions

Add unit converting for standard values AKA choose standard units. Already has been implemented for armor and gun size.

Fix Coding Conventions

As the title states, the coding conventions (the style of the code) are a little rough...because this was my first python project. Need to be fixed at some point.

Parallelize

Things that can/should be Parallelize:

  • Script in ABoatScraping.ship_compare.ship_network_algo.run_algo_on_network.py

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.