mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2025-12-26 04:48:05 +08:00
24 lines
478 B
Python
24 lines
478 B
Python
import requests
|
|
|
|
|
|
class Html:
|
|
|
|
def __init__(self, headers: dict):
|
|
self.headers = headers
|
|
|
|
def get_html(
|
|
self,
|
|
url: str,
|
|
params=None,
|
|
proxies=None,
|
|
timeout=10,
|
|
**kwargs):
|
|
response = requests.get(
|
|
url,
|
|
params=params,
|
|
proxies=proxies,
|
|
timeout=timeout,
|
|
headers=self.headers,
|
|
**kwargs)
|
|
return response.text
|