Skip to main content

WebRender: A Simple Web Content Renderer for Python

PyPI Version Build Status License: MIT

WebRender is a Python package that provides a simple and effective way to render web content within environments like Jupyter Notebooks and IPython. It's designed to overcome common embedding restrictions, allowing you to display any website or embed YouTube videos seamlessly.

Key Features

  • Render Any Website: Utilizes Selenium to capture and display a screenshot of any URL, bypassing X-Frame-Options restrictions.
  • Embed YouTube Videos: Easily embed YouTube videos with just the URL.
  • Jupyter/IPython Integration: Designed to work smoothly within Jupyter Notebooks and IPython environments.
  • Automatic Driver Management: Uses webdriver-manager to automatically handle the required Chrome WebDriver.

Installation

You can install WebRender directly from PyPI:

pip install WebRender

Usage

WebRender is simple to use. Here are a couple of examples:

Rendering a Website

You can render any website using the render_site function. This will take a screenshot of the page and display it.

from WebRender.site import render_site

# Render Google's homepage
render_site('https://www.google.com')

# Render a specific article
render_site('https://en.wikipedia.org/wiki/Main_Page')

Embedding a YouTube Video

Use the render_youtube_video function to embed a YouTube video directly in your notebook.

from WebRender.youtube import render_youtube_video

# Embed a YouTube video by URL
render_youtube_video('https://www.youtube.com/watch?v=dQw4w9WgXcQ')

Dependencies

  • Python 3.8+
  • Google Chrome: This package requires Google Chrome to be installed on your system.
  • The necessary Python packages (selenium, webdriver-manager, etc.) will be installed automatically.

Contributing

Contributions are welcome! If you have a feature request, bug report, or want to contribute to the code, please feel free to open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for WebRender 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for WebRender 0.0.8
File Size Uploaded
webrender-0.0.8.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for WebRender 0.0.8
File Interpreter ABI Platform
webrender-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 10.1 kB

Release files / webrender-0.0.8.tar.gz

Download URL webrender-0.0.8.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
26728695f44076c89283d3e21d7a8df189f395f54b24153b8821273c14451841
BLAKE2b-256 checksum
How to use checksums
1f0febef0ac46b8f9f50bde46f34d4a5dee61128e5eebcd3724511a1d8a3c394
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / webrender-0.0.8-py3-none-any.whl

Download URL webrender-0.0.8-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a583af02667d419ed24991bbc560f85298b1e71247ae1efa255410309187a1f
BLAKE2b-256 checksum
How to use checksums
f9de3b6df7b988b5e91cb80323894730a16e8bc465b8e407532382439f031954
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page