Skip to content

get songs from osu profiles, and query through them in GUI

License

Notifications You must be signed in to change notification settings

rfdzan/hosutory

Repository files navigation

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.

About

get songs from osu profiles, and query through them in GUI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages