Skip to main content

A small web render python package

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webrender-0.0.7.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webrender-0.0.7-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file webrender-0.0.7.tar.gz.

File metadata

  • Download URL: webrender-0.0.7.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for webrender-0.0.7.tar.gz
Algorithm Hash digest
SHA256 6ca1865d851c3ea71a16839dcc6e902f8339fa25ad102fac0cabbc110399b84f
MD5 dd48330e621b1c668eae330a33500420
BLAKE2b-256 49bbb0379f042465fc97619d5a08214d06384bb9201b9e760aeb72a5611297fc

See more details on using hashes here.

File details

Details for the file webrender-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: webrender-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for webrender-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 06819d9771cc7fad4f3603f8e38708c580dc8aa53fa04190d3b45f9ebedf2804
MD5 0d8d9e705196a39cacb6d3f54c3f4fb9
BLAKE2b-256 5b48ca472be966fb6b992da10e68f13267d1f7e647a0e3be4bddbcbb044e5ba1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page