class Muse::Dl::Fetch
- Muse::Dl::Fetch
- Reference
- Object
Defined in:
fetch.crConstant Summary
-
DOWNLOAD_TIMEOUT_SECS =
60
-
HEADERS =
{"User-Agent" => USER_AGENT, "Accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "Accept-Language" => "en-US,en;q=0.5", "Connection" => "keep-alive"}
-
USER_AGENT =
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
Class Method Summary
- .article_file_name(id : String, tmp_path : String)
- .chapter_file_name(id : String, tmp_path : String)
- .cleanup(tmp_path : String, id : String)
- .cleanup_articles(tmp_path : String, id : String)
- .get_info(url : String)
- .save_article(tmp_path : String, article_id : String, cookie : String | Nil = nil, article_title = nil, strip_first_page = true)
- .save_chapter(tmp_path : String, chapter_id : String, chapter_title : String, cookie : String | Nil = nil, add_bookmark = true, strip_first_page = true)
- .save_url(url : String, referer : String, file_name : String, tmp_path : String, cookie : String | Nil = nil, bookmark_title : String | Nil = nil, strip_first_page = true)
Class Method Detail
def self.save_article(tmp_path : String, article_id : String, cookie : String | Nil = nil, article_title = nil, strip_first_page = true)
#
def self.save_chapter(tmp_path : String, chapter_id : String, chapter_title : String, cookie : String | Nil = nil, add_bookmark = true, strip_first_page = true)
#
def self.save_url(url : String, referer : String, file_name : String, tmp_path : String, cookie : String | Nil = nil, bookmark_title : String | Nil = nil, strip_first_page = true)
#