Class: CookieExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/sexy_download.rb

Constant Summary collapse

CHROME_COOKIES_FILE_MAC_OSX =
"Library/Application Support/Google/Chrome/Default/Cookies"

Instance Method Summary collapse

Constructor Details

#initialize(domain, dir) ⇒ CookieExtractor

Returns a new instance of CookieExtractor.



15
16
17
# File 'lib/sexy_download.rb', line 15

def initialize domain, dir
  @domain, @dir, @cookies_txt = domain, dir, []
end

Instance Method Details

#extract!Object



19
20
21
22
23
# File 'lib/sexy_download.rb', line 19

def extract!
   find_host_key!
   generate_cookie!(read_cookie!)
   @file_path
end