pub fn parse_url(url: &str) -> Result<(Option<FileId>, bool)>Expand description
Parse a Google Drive URL and extract the file ID.
§Arguments
url- A Google Drive URL string
§Returns
Ok((Some(file_id), is_download_link))- Successfully parsedOk((None, false))- Not a Google Drive URL
§Examples
use gdown_core::parse_url;
let (id, is_dl) = parse_url("https://drive.google.com/file/d/1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ/view").unwrap();
assert!(id.is_some());