• 过滤image下载


    在测试的时候,有的开发人员只关心自己的程序,并不想测试整个web下载的过程。毕竟image下载是非常耗时的。这个时候,我们就应该要将那些url过滤掉。web_add_auto_filter()这个函数可以帮助我们做到。
    下面是关于这个函数的简介。
    他包含两个参数:
    一、Action:
    1.value=include/exclude

    二、Attributes:
    1.value:

    URL - the specific URL to filter

    UrlPrefix - Filter all URLs that begin with this string. For example,

    "UrlPrefix = http://www.cc"

    filters http://www.ccn.com, http://www.cc.edu, http://cc-nanochem.de, and any other URL that begins with "http://www.cc"

    Host - URLs which include Host in the hostname portion of the URL path are filtered

    HostPrefix - URLs which include this prefix in the hostname portion of the URL path are filtered

    HostSuffix - URLs which include this suffix in the host name portion of the URL path are filtered

    Path - URLs with the specified path are filtered

    PathPrefix - URLs with the specified path prefix are filtered

    PathSuffix - URLs with the specified path suffix are filtered

    Port - URLs from the specified port are filtered

    Scheme - URLs with the specified communications scheme are filtered. Example schemes are http, https and ftp

    Query - URLs with the specified query are filtered

    QueryPrefix - URLs with the specified query prefix are filtered

    QuerySuffix - URLs with the specified query suffix are filtered

    FragmentId - URLs containing a matching Fragment ID are filtered

    FragmentIdPrefix - URLs containing a matching Fragment ID prefix are filtered

    FragmentIdSuffix - URLs containing a matching Fragment ID suffix are filtered

    ID: An identifier for use by web_remove_auto_filter.

    三、例子

    web_add_auto_filter("action=include","urlprefix=http://cnblogs.com/",last);
    web_url();

  • 相关阅读:
    Android基础笔记(十八)- Fragment
    fedora20配置静态ip
    读《编程之美》励志篇
    官方教程Stealth学习笔记(一)
    从头认识Spring-2.4 基于java的标准注解装配-@Inject-限定器@Named
    POJ2186 Popular Cows [强连通分量|缩点]
    HDU2767Proving Equivalences[强连通分量 缩点]
    POJ1236Network of Schools[强连通分量|缩点]
    [USACO14OPEN] Dueling GPS's[最短路建模]
    洛谷2448 无尽的生命[树状数组 离散化]
  • 原文地址:https://www.cnblogs.com/morebetter/p/297133.html
Copyright © 2020-2023  润新知