smallbrowser
pip install smallbrowser
A small HTTP browser library in Python based on the requests library.
You can omit using this library and entirely use the requests library and achieve the same functionality.
This library is designed for the poor.
Glory be to our LORD Jesus Christ.
Dependency
All due credits to requests and pyquery Python libraries.
Concept
This library is only composed of five (5) methods.
- Browser#type(String url)
- Browser#enter()
- Browser#fillup(dict form)
- Browser#submit()
- Browser#response
Similar to what you do with a browser, you type the URL and press enter to load the URL. Then, you will get a response back. When there is a form, you fill up the form and click submit.
Usage
The code below will print out the raw HTML of https://www.google.com website.
from smallbrowser import Browser
browser = Browser("browser.storage")
response = browser.type("https://www.google.com").enter().response
print(response.text)
The Browser#response is the return object from requests library.
When initializing the Browser object, you need to pass a path to a directory, which is named browser.storage. This directory is automatically created by the library. This will contain session information so that your session may be saved.
For debugging purposes, you may open the browser.storage/contents and browser.storage/responses directory that contains information about all your visited websites.
GRACE AND PEACE TO YOU FROM OUR LORD JESUS CHRIST. OUR LORD JESUS LOVES YOU.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file smallbrowser-0.1.5.tar.gz.
File metadata
- Download URL: smallbrowser-0.1.5.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5f7a5889c525a4fe0d9fe60df73679dcde9532bbc3dbef52403154dd80e07f5
|
|
| MD5 |
fffd2291a7b92275365ab798472fe22e
|
|
| BLAKE2b-256 |
5991cb034c39d3d060789ebd2f40a71ada30e7a59988c13d845d86612eb1185e
|