Skip to content

Simple module to get preview of any website

Notifications You must be signed in to change notification settings

awgeezrick/webpreview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

webpreview

Installation

Will make it pip installable

$ git clone https://github.com/sdushantha/webpreview.git

Example usage

import webpreview

# returns a desktop preview of the website [179x320]
webpreview.desktop("https://www.hackerone.com", filename="image1.jpg")

# returns a mobile preview of the website [568x320]
webpreview.mobile("https://www.hackerone.com", filename="image2.jpg")

Example preview

Desktop [179x320]

img1

Mobile [568x320]

img2

Limititations

  • Image width is 320px
  • Web fonts can prove tricky
  • There's no way to pass authentication or cookie data, so you just get the "public" view of the page.
  • Plugins like Flash and Java may not work.
  • Complex JavaScript pages won't always work.
  • It's a bit slow to generate the image.
  • Only one rendering, so you can't use it to see how Firefox compares to Chrome.

About

Simple module to get preview of any website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages