Skip to content

Commit

Permalink
address #22 (?)
Browse files Browse the repository at this point in the history
  • Loading branch information
JBGruber committed Nov 11, 2024
1 parent 13fc275 commit 9d96f36
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/parse_hidden.r
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ parse_video <- function(json_string, video_id) {
video_status = spluck(tt_data, "__DEFAULT_SCOPE__", "webapp.video-detail", "statusMsg"),
video_status_code = spluck(tt_data, "__DEFAULT_SCOPE__", "webapp.video-detail", "statusCode")
)

if (identical(out$download_url, "")) {
out$download_url <- spluck(video_data, "video", "playAddr")
}

if (identical(out$download_url, "")) {
out$download_url <- purrr::pluck(video_data, "imagePost", "images", "imageURL", "urlList") |>
purrr::map_chr(1L) |>
Expand Down

0 comments on commit 9d96f36

Please sign in to comment.