• 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

  • 相关阅读:
    Java注释Override、Deprecated、SuppressWarnings详解
    android: 实现跨程序数据共享
    android: 创建自己的内容提供器
    android: 通过内容提供器读取系统联系人
    android: 内容提供器简介
    android: UriMatcher的用法
    java中static{}语句块详解
    android: SQLite 数据库的最佳实践
    android: SQLite使用 SQL 操作数据库
    android: SQLite查询数据
  • 原文地址:https://www.cnblogs.com/crxis/p/12584747.html
Copyright © 2020-2023  润新知