public function download()
 {
     $this->default_dir = DConfig::p_folder();
     echo "List URL: ";
     $list_url = trim(fgets(STDIN));
     echo "Save Dir [{$this->default_dir}]: ";
     $dir = trim(fgets(STDIN));
     $dir = $this->prepare_dir($dir, $list_url);
     $this->collect_images($list_url, $dir);
 }
 public function download()
 {
     $this->default_dir = DConfig::p_folder();
     echo "Gallery URL: ";
     $gallery_url = trim(fgets(STDIN));
     echo "Save Dir [{$this->default_dir}]: ";
     $dir = trim(fgets(STDIN));
     $dir = $this->prepare_dir($dir, $gallery_url);
     $this->download_all($gallery_url, $dir);
 }
 public function download()
 {
     $this->default_dir = DConfig::p_folder();
     echo "List URL: ";
     $list_url = trim(fgets(STDIN));
     echo "Save Dir [{$this->default_dir}]: ";
     $dir = trim(fgets(STDIN));
     echo "Page setting [1,10]: ";
     $page_conf = trim(fgets(STDIN));
     $page_conf = explode(',', $page_conf);
     if (!empty($page_conf[0])) {
         $this->page_from = (int) $page_conf[0];
     }
     if (!empty($page_conf[1])) {
         $this->page_to = (int) $page_conf[1];
     }
     $dir = $this->prepare_dir($dir, $list_url);
     $this->collect_images($list_url, $dir);
 }