Title: | An 'Utanet' Scraper and Utilities |
---|---|
Description: | Scrape lyrics from 'Utanet' website. |
Authors: | Akiru Kato [aut, cre], Saurabh Shrivastava [ctb] |
Maintainer: | Akiru Kato <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.5.0 |
Built: | 2024-11-20 05:36:03 UTC |
Source: | https://github.com/paithiov909/aznyan |
An operator to evaluate an expression while logging its execution time.
lhs %timer% rhs
lhs %timer% rhs
lhs |
An expression. |
rhs |
An expression. |
lhs %timer% rhs
evaluates rhs
inside a system.time call,
assigns the execution time to the variable time
,
and tries to evaluate lhs
in an environment where time
exists.
In doing so, failure to evaluate the left-hand side
does not result in an error.
Values from evaluated rhs
is returned invisibly.
print(time) %timer% { rnorm(10) ^2 }
print(time) %timer% { rnorm(10) ^2 }
Scrape lyrics from list
get_lyrics(df, file, links = "link")
get_lyrics(df, file, links = "link")
df |
A tibble that comes of |
file |
String; file name to append lyrircs. |
links |
String; column name of lyrics links. |
file
is returned invisibly.
## Not run: csv_file <- aznyan::get_lyrics_list("23729") |> aznyan::get_lyrics("23729.csv") tbl <- readr::read_csv(csv_file, col_names = F, col_types = "cccc___cDn") |> dplyr::rename( title = X1, artist = X2, lyricist = X3, composer = X4, text = X8, released = X9, page_view = X10 ) ## End(Not run)
## Not run: csv_file <- aznyan::get_lyrics_list("23729") |> aznyan::get_lyrics("23729.csv") tbl <- readr::read_csv(csv_file, col_names = F, col_types = "cccc___cDn") |> dplyr::rename( title = X1, artist = X2, lyricist = X3, composer = X4, text = X8, released = X9, page_view = X10 ) ## End(Not run)
Scrape table of lyrics list
get_lyrics_list(id, type = c("artist", "lyricist", "composer"))
get_lyrics_list(id, type = c("artist", "lyricist", "composer"))
id |
String; substring xxx of 'https://www.uta-net.com/:type:/xxx/'. |
type |
String; one of "artist", "lyricist", or "composer". |
tibble.
Read srt file
read_srt(path, collapse = "\n")
read_srt(path, collapse = "\n")
path |
Path to srt file. |
collapse |
String. |
A tibble.
Search lyrics list by keyword
search_lyrics_list(keyword, sort = c("new", "popular", "title", "artist"))
search_lyrics_list(keyword, sort = c("new", "popular", "title", "artist"))
keyword |
String; search phrase. |
sort |
String; one of "new", "popular", "title", or "artist". |
tibble