Skip to main content

Sending urls get responce as html text

Project description

pyHtml

# html_txt Function
The html_txt function fetches HTML content from the specified URL, using optional headers and data for the request.
```bash
from your_module import html_txt

url = 'https://example.com'
headers = {
    'User-Agent': 'Your User Agent',
    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
    'Accept-Language': 'en-US,en;q=0.9',
    'Accept-Encoding': 'gzip, deflate, br',
    'Connection': 'keep-alive',
}
data = {'key': 'value'}  # Optional data for POST requests

parsed_html = html_txt(url, headers=headers, data=data) # data for POST requests 
parsed_html = html_txt(url, headers=headers) #  for Get requests 
print(parsed_html)

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

Html_txt-1.0.0.3.tar.gz (2.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page