zoukankan      html  css  js  c++  java
  • wget命令之用户密码cookies断点续传指定类型整站下载

    wget是在linux下最常用的下载的工具,支持多种条件的下载。

    普通下载

    wget http://example.com/file.iso

    指定保存文件名

    wget ‐‐output-document=myname.iso http://example.com/file.iso

    保存到指定目录

    wget ‐‐directory-prefix=folder/subfolder http://example.com/file.iso

    大文件断点续传

    wget ‐‐continue http://example.com/big.file.iso

    下载最新版本

    wget ‐‐continue ‐‐timestamping http://wordpress.org/latest.zip

    下载指定文件中的url列表

    wget ‐‐input list-of-file-urls.txt

    下载指定数字列表的多个文件

    wget http://example.com/images/{1..20}.jpg

    下载web页面的所有资源

    wget ‐‐page-requisites ‐‐span-hosts ‐‐convert-links ‐‐adjust-extension http://example.com/dir/file

    下载整个网站

    下载所有lian接的页面和文件

    wget ‐‐execute robots=off ‐‐recursive ‐‐no-parent ‐‐continue ‐‐no-clobber http://example.com/

    下载指定后缀的文件

    wget ‐‐level=1 ‐‐recursive ‐‐no-parent ‐‐accept mp3,MP3 http://example.com/mp3/

    下载指定目录的所有图片

    wget ‐‐directory-prefix=files/pictures ‐‐no-directories ‐‐recursive ‐‐no-clobber ‐‐accept jpg,gif,png,jpeghttp://example.com/images/

    下载多个域名下的pdf文件

    wget ‐‐mirror ‐‐domains=abc.com,files.abc.com,docs.abc.com ‐‐accept=pdf http://abc.com/

    排除指定目录下载

    wget ‐‐recursive ‐‐no-clobber ‐‐no-parent ‐‐exclude-directories /forums,/support http://example.com

    绕过限制下载

    指定user-agent

    wget ‐‐refer=http://google.com ‐‐user-agent=”Mozilla/5.0 Firefox/4.0.1″ http://baidu.com

    指定用户名密码

    wget ‐‐http-user=labnol ‐‐http-password=hello123 http://example.com/secret/file.zip

    post帐号密码并保存cookie

    wget ‐‐cookies=on ‐‐save-cookies cookies.txt ‐‐keep-session-cookies ‐‐post-data 'user=labnol&password=123'http://example.com/login.php

    使用cookie下载文件

    wget ‐‐cookies=on ‐‐load-cookies cookies.txt ‐‐keep-session-cookies http://example.com/paywall

  • 相关阅读:
    poj1113--凸包(Andrew)
    php变量内存完全释放
    php的内存分配还是很智能的
    git 忽略权限记录一下
    开启事务处理插入多条数据 速度也可以
    var_dump(is_writeable(ini_get("session.save_path")));
    要注意一下xss攻击啊
    select *," as A from B union ...
    多次踩坑
    js instanceof运算符
  • 原文地址:https://www.cnblogs.com/crxis/p/12584747.html
Copyright © 2011-2022 走看看