Fastest Way to request to send HTTP/1.1 requests extremely easily also able to enable javascript for pageload and capture html code
Project description
RequestWeb
RequestWeb is a Python library for requesting a website and getting data from the website and response as an HTML code. It provides additional features like favicon generation from URL, extracting the title of the webpage, obtaining SSL information about the website, and supporting JavaScript-enabled websites to get data.
Features
- Request a website and get the data as html code
- Generate favicon from URL
- Extract title from the webpage
- Obtain SSL information about the website
- Support JavaScript-enabled websites to get data
Installation
pip install requestweb
1 Get HTML Code
import requestweb
html = requestweb.load_url('https://www.python.org/')
if html:
print(html)
<html>
<head>
<title>pythonDomain</title>
<meta charset="utf-8"/>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<style type="text/css"></style>
</head>
<body data-new-gr-c-s-check-loaded="14.1039.0" data-gr-ext-installed="">
<div>
<h1>Example Domain</h1>
<p>This domain is for use in illustrative examples in documents.</p>
<p> <a href="https://nullfunctions.weebly.com/">Learn More...</a> </p>
</div>
</body>
</html>
2 Get Title
import requestweb
title = requestweb.getTitle('https://www.python.org/')
if title:
print(title)
Title:-Python
3 Get Favicon
import requestweb
fav = requestweb.getFavicon('https://www.python.org/')
if fav:
print(fav)
Favicon:-data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACOElEQVQ4jWWTTUhVQRTHf/e+a+/1RCghSqNN0KYWbVq1aCFIm5AKHtQ2cFOUazdB0CKIiHZKmxbSxkUkiFFEkRGmpW0tIrNMBTU/3r0zb+bM3Bbv3rzqwGFg5vc/5z8fJ2DX6Hnw9pk0zDnvTLvYBmIM0lDaKv3448D1fkADLufD3Qm8k4uj/d3tTizOWrxYvHeVNPA3gWNApcjvSeCs5fydEZzY7bA23+4AqkU+Auh5+P62t/a4WBUYnQwZVY9ExyVnDOG+ci1Nfc6XgdKOBJcffXjtxHalXsB7AqAUtUC5CkEJJ7bIk87XFr2Ntej6/fKpd/dC711X06rZaTuLfIjaGgMskhA6VYnQN4DOKAd9QeQL505Tr52O30w/6R9cme7uRhRIQuhVO9AR7RBbi66vjy1MjDxdmHm1DgiQAmZ+vPvkwVbpwylwCUgCsD8S09BebMWJRW2sDE8O9g1t/rx1pbVy4lLoVOU/LDF5dUThRWsgCJ3IXG79z9TL5/Gvvt62qr8a+qI4KYgTcJokSacAEzodD4gx2onl9/ToerXiLmwLCqKCGGBmVr8AtoLsZ3UAR4FGunhtMoeXl/4Ol7xKm04UOAXAtznz5Wzv2gTwIwIMsARsAmmx2uEDroYIOAtiCc4sdQF1QGX8agj4bGEVWPM20U2rhTj9FZ+mOnuRReB7Nid7eqG+uVGzOv7sTaxzJ3aic3b8k7oLWCDJClogDXYnyO7kEHAEaANaMpdbWdVlmi0NwD8Bv6//isUl3wAAAABJRU5ErkJggg==
4 Get SSL Info
import requestweb
ssl = requestweb.get_ssl_details('https://www.python.org/')
if ssl:
print(ssl)
{'safe': True, 'expires': datetime.datetime(2025, 6, 10, 12, 50, 10), 'issuer': 'GlobalSign Atlas R3 DV TLS CA 2024 Q2'}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file requestweb-1.0.1.tar.gz.
File metadata
- Download URL: requestweb-1.0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6a6dbf8466875d61020b363316de100d765de52a7bce43034165a09ba1fa64f
|
|
| MD5 |
ba89bd7443b7aed0681589b7170410bb
|
|
| BLAKE2b-256 |
d94890e57aee9d267fe015d2b2851b32ccad4e96e22c4a8d5f60643de50b06c0
|
File details
Details for the file requestweb-1.0.1-py3-none-any.whl.
File metadata
- Download URL: requestweb-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef32ee1306cd40526b28593af002eb60b977f7209e89667f1c5ee7cc8e2d3c2c
|
|
| MD5 |
0fe4ce8050d8fa6cb10f41e49b335896
|
|
| BLAKE2b-256 |
980f781610fc40f323e3806604c4bcee35507fef114b456a71da9f9a355dbadb
|