class Muse::Dl::Fetch

Defined in:

fetch.cr

Constant 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

Class Method Detail

def self.article_file_name(id : String, tmp_path : String) #

[View source]
def self.chapter_file_name(id : String, tmp_path : String) #

[View source]
def self.cleanup(tmp_path : String, id : String) #

[View source]
def self.cleanup_articles(tmp_path : String, id : String) #

[View source]
def self.get_info(url : String) #

[View source]
def self.save_article(tmp_path : String, article_id : String, cookie : String | Nil = nil, article_title = nil, strip_first_page = true) #

[View source]
def self.save_chapter(tmp_path : String, chapter_id : String, chapter_title : String, cookie : String | Nil = nil, add_bookmark = true, strip_first_page = true) #

[View source]
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) #

[View source]