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

  • 相关阅读:
    关于返回上一页功能
    Mybatis Update statement Date null
    SQLite reset password
    Bootstrap Validator使用特性,动态(Dynamic)添加的input的验证问题
    Eclipse使用Maven2的一次环境清理记录
    Server Tomcat v7.0 Server at localhost failed to start
    PowerShell一例
    Server Tomcat v7.0 Server at libra failed to start
    商标注册英语
    A glance for agile method
  • 原文地址:https://www.cnblogs.com/crxis/p/12584747.html
Copyright © 2011-2022 走看看