artist entity used as the primary data source for album/artist ID scrape
TypeORM repository handling all data flow in/out of album table
artist entity, derived from the album.artist relation
TypeORM repository handling all data flow in/out of artist table
Scrapers always check for a local copy of the target resource (using Scraper.checkForLocalRecord) before executing a scrape from an external resource. If the resource was found (and therefore no external calls made), this is set to true.
A simple, human-readble description of what is being scraped. Used for logging.
Contains all results generated by Scraper.scrape, including recursive calls.
Flag indicating a sucessful scrape, set to true after non-error-throwing call to Scraper.scrape.
Spotify data populated by calls to SpotifyIdScraper.requestScrape
Used to override .env settings and force-log the output of a given scraper.
Conditional method runner to set album/artist IDs
First, looks for an exact album/artist match. If there is no exact match, looks for a
substring match. For example, a search for Master of Puppets
will fail, as Spotify
only has the album Master of Puppets (Remastered)
. However, there are other instances
where both exist, such as Hurry Up, We're Dreaming
and
Hurry Up, We're Dreaming (Commentary)
. This method prioritizes the perfect match, but
will settle for the substring if there is no other option.
Implements the album/artist name/id matching discussed in the description of SpotifyIdScraper.extractCorrectAlbumArtistPair. For all album/artist name comparisons, names are preprocessed by SpotifyIdScraper.requestScrape.
If false, a RYM album name that is a substring of the Spotify album name still counts as a match. If true, only true equality matches.
Simple CLI reporting tool for debugging unsuccessful scrapes
Entry point for initiating an asset scrape. General scrape outline/method order:
If set to true, scrapes the external resource regardless of any existing local records
Executes Scraper.scrape on any recursive scrapes found in the initial scrape. Defaults to simply resolving an empty promise, so subclasses with no dependencies don't have to implement this function. See Scraper.scrape for more information on implementation.
the entity that was saved
Intercepts any errors thrown by Scraper.scrape
"sanitizes" a string by removal all spaces and transforming all letters to lowercase
Scrape the genres associated with this artist
Generated using TypeDoc
Spotify Album/Artist ID Scraper
Finds Spotify album/artist pair for an AlbumEntity. On a successful match, the IDs are saved into AlbumEntity.spotifyId and ArtistEntity.spotifyId.