With the help of this module,you can access the information of various websites. The applications of this module are as follows:
Working with parse_web
Get IP address:
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.get_ip())
Get ping :
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.ping())
parameters :
mode: The mod parameter can be equal to: min: Returns the lowest ping mid : Returns the average ping max: Returns the maximum ping.number: is an integer, the higher this numerical parameter is, the more accurate the obtained ping is. But it takes a lot of time to get ping.
Get links :
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.get_links())
Get link of images :
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.get_images())
Get link of videos :
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.get_videos())
Get CSS code :
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.css_code())
parameters :
link_or_code: The mod parameter can be equal to:
- link: Returns a list of css links (default)
- code : It returns a dictionary of css codes whose key is the css link and its value is the css code.
Get information :
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.information())
Returns a list of whois information as str
social networks:
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.social())
It returns a dictionary whose key is the name of the social network and its value is the address of the social network
get Textual content :
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.text())
Returns the text content as str
Technologies used :
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.technology())
It returns the used technologies in the form of a dictionary.
Find a word in url:
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.isit('python'))
parameters :
word:It is equal to the desired word, if the desired word exists in the url, it returns true and if it does not exist, it returns false.
Find files in url:
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.find_file('.pdf' , '.ico' , '.png'))
parameters :
suffix: A set of extensions (at least one extension); Suffixes can start with a dot or be written without a dot.
is wordpress ? :
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.iswordpress())
If it is written with WordPress; Returns true otherwise returns false.
Find tags in url:
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.tag('h1'))
parameters :
tag: It is equal to the desired tag that you want to extract from the urlattribute: is equal to the attribute in question ( defualt = None)
Returns a list of the desired tags that have the given attribute.
Access to robots.txt:
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.robots())
If the robots.txt file is defined in the url, it returns it, otherwise it returns false.
return title :
import parse_web as pw
url = pw.set_url("https://python.org")
print(url.title())
Returns the title of the site.
Metadata
Release files for parse-web 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| parse_web-1.0.0.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parse_web-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / parse_web-1.0.0.tar.gz
| Download URL | parse_web-1.0.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9aa915f80dac39786893861c24bab8c880c9cd3842bc850ab0443f69a4398283
|
|
BLAKE2b-256 checksum How to use checksums |
76b70e65ef906d824e714bccb46056ecff656501b73e0f70f130a17cf3857bae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.9
|
Release files / parse_web-1.0.0-py3-none-any.whl
| Download URL | parse_web-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d54a52ee01b2166dc8bda357db7d31ef08d92b5052ff1275f5cb48080959aa9
|
|
BLAKE2b-256 checksum How to use checksums |
4062d25f1b25f74cf3f6d4c8c7f75cc130a3230cb822629894305fb0495a709c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.9
|