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.6.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.6-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: webrender-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 539d78cdda1492f30a886306beec4ef4fbde761391d3c1e13d09e6709ce60b7c
MD5 37b4f3748833b091fdbab0c09bcae0f3
BLAKE2b-256 4798adacdb9a8f06006783cc5205411e9ac259b35c36e1164c3586ae51817a29

See more details on using hashes here.

File details

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

File metadata

  • Download URL: webrender-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a7ac7ee616c1b0f5828c39f127fb0eab0c8e43a19d8a0c6260e63d84d8e6739e
MD5 c67f73338eee8304a924c32594daf4fb
BLAKE2b-256 1ff4fe86af99f364008985e6db9c8966010c987493d20e804bdcfa20176d48a7

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