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.8.tar.gz (4.8 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.8-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: webrender-0.0.8.tar.gz
  • Upload date:
  • Size: 4.8 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.8.tar.gz
Algorithm Hash digest
SHA256 26728695f44076c89283d3e21d7a8df189f395f54b24153b8821273c14451841
MD5 fe9f748b68ef3b906c29970c334d4b71
BLAKE2b-256 1f0febef0ac46b8f9f50bde46f34d4a5dee61128e5eebcd3724511a1d8a3c394

See more details on using hashes here.

File details

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

File metadata

  • Download URL: webrender-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 7a583af02667d419ed24991bbc560f85298b1e71247ae1efa255410309187a1f
MD5 d92f4beb5f7a4bfc1fade26cbc811319
BLAKE2b-256 f9de3b6df7b988b5e91cb80323894730a16e8bc465b8e407532382439f031954

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