Blocking Resource Loading

If the target website has resources that you don't need, such as images, videos, etc., you can block them by setting the header X-py-Block-Resources. This can save you more waiting time and data usage.When selecting the rendering type for HTML, blocking resource loading may be a good option.

We currently support the following resource blocking:

  • Image

  • Media

  • Stylesheet

  • Script

  • WebSocket

  • Font

You can specify multiple block types separated by a [,].

Example:

To block Image and Script resources from the target website:

curl -x -k unblock.pyproxy.io:16500 -U "USERNAME-zone-unblock-region-US:PASSWORD" -H "X-Pyproxy-Render:html" -H "X-Pyproxy-Block-Resources:Image,Script"  "https://open.pyproxy.com"

Last updated