Giter Site home page Giter Site logo

hosutory's Introduction

hosutory

clone linux-compatinstead if you're on linux. Pull songs from Most Played Beatmaps section of any osu player profile, given their player IDs.

Most Played Beatmaps

Setup:

Requires Python 3.11 and above

  1. Install Poetry (visit their website).
https://python-poetry.org/docs/#installation
  1. Clone this repo.
git clone https://github.com/hkohko/osu-song-history.git
  1. Install dependencies.
cd osu-song-history
poetry install

How to Scrape and Save:

Uses SQLite3

  1. Double click ./run_scrape.py

The scrape GUI

scrape gui
ID is the player's id. start and stop refers to the number of Most Played Beatmaps displayed on the profile.

If Store JSON to Database is checked, the program will :

  1. Download the JSON files
  2. Parse the JSON files and store ONLY:
    • Artist
    • Title
    • Preview
    • Source

Otherwise, it only downloads and store the raw JSON files. They also do not show up in view GUI.

Example:

user_id:
ID

index:
index

Based on the information above, a straightforward way is to simply type in:
example

Each .json files contain a maximum of 100 songs. They are stored in scrape_osu_songs/songs/<user_id>/.

As the path suggests, each ID has its own folder containing the .json files.

Viewing the Data:

a simple GUI is provided to view and query the data.

  1. Double click ./run_view.py

The view GUI

Reads from the database.

GUI

How to use:

  1. Type in the artist, title or source (where the song originates from, e.g. SOUND VOLTEX) inside the input field.
  2. Choose what you want to search for: Artist, Title, or Source
  3. Choose by what you want to sort the data with: Artist or Title.
  4. Press Search or simply Enter.

The words are kinda weird but let me explain.

Based on the image above:

From the database, show me data where the artist column contains keywords like 'miku'.

By default, the program will search by keywords you type in, hence 'like'.

However, if the Exact? box is checked, it will only show you exact matches.

Sort by choices are pretty straightforward, sort by either Artist or Title. Clear simply clears the input field.

The context menu (still being worked on):

Context manu
You can right-click on any entry, gives you (currently) 1 handy option, Preview.

Preview simply opens the browser and gives you a 10 second sample of the song. It is similar to previewing the song on osu website itself.

There are different things being planned here. One obvious option is to simply bring you to YouTube where you can listen to the song.

We'll see.

hosutory's People

Contributors

rfdzan avatar

Watchers

 avatar

hosutory's Issues

catch errors for illegal json files

L60

beatmapset = item.get("beatmapset")
artist = beatmapset.get("artist")
title = beatmapset.get("title")
preview = beatmapset.get("preview_url")
source = beatmapset.get("source")

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.