Karim shoair commited on
Commit ·
50e4788
1
Parent(s): 6924ad4
style: Correcting return type annotation for Fetcher/AsyncFetcher (#93)
Browse files- scrapling/engines/static.py +378 -0
- scrapling/fetchers/requests.py +1 -9
scrapling/engines/static.py
CHANGED
|
@@ -650,6 +650,195 @@ class FetcherClient(FetcherSession):
|
|
| 650 |
self.__aexit__ = None
|
| 651 |
self._curl_session = True
|
| 652 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 653 |
|
| 654 |
class AsyncFetcherClient(FetcherSession):
|
| 655 |
def __init__(self, *args, **kwargs):
|
|
@@ -659,3 +848,192 @@ class AsyncFetcherClient(FetcherSession):
|
|
| 659 |
self.__aenter__ = None
|
| 660 |
self.__aexit__ = None
|
| 661 |
self._async_curl_session = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 650 |
self.__aexit__ = None
|
| 651 |
self._curl_session = True
|
| 652 |
|
| 653 |
+
# Setting the correct return types for the type checking/autocompletion
|
| 654 |
+
def get(
|
| 655 |
+
self,
|
| 656 |
+
url: str,
|
| 657 |
+
params: Optional[Dict | List | Tuple] = None,
|
| 658 |
+
headers: Optional[Mapping[str, Optional[str]]] = _UNSET,
|
| 659 |
+
cookies: Optional[CookieTypes] = None,
|
| 660 |
+
timeout: Optional[int | float] = _UNSET,
|
| 661 |
+
follow_redirects: Optional[bool] = _UNSET,
|
| 662 |
+
max_redirects: Optional[int] = _UNSET,
|
| 663 |
+
retries: Optional[int] = _UNSET,
|
| 664 |
+
retry_delay: Optional[int] = _UNSET,
|
| 665 |
+
proxies: Optional[ProxySpec] = _UNSET,
|
| 666 |
+
proxy: Optional[str] = _UNSET,
|
| 667 |
+
proxy_auth: Optional[Tuple[str, str]] = _UNSET,
|
| 668 |
+
auth: Optional[Tuple[str, str]] = None,
|
| 669 |
+
verify: Optional[bool] = _UNSET,
|
| 670 |
+
cert: Optional[str | Tuple[str, str]] = _UNSET,
|
| 671 |
+
impersonate: Optional[BrowserTypeLiteral] = _UNSET,
|
| 672 |
+
http3: Optional[bool] = _UNSET,
|
| 673 |
+
stealthy_headers: Optional[bool] = _UNSET,
|
| 674 |
+
**kwargs,
|
| 675 |
+
) -> Response:
|
| 676 |
+
return super().get(
|
| 677 |
+
url,
|
| 678 |
+
params,
|
| 679 |
+
headers,
|
| 680 |
+
cookies,
|
| 681 |
+
timeout,
|
| 682 |
+
follow_redirects,
|
| 683 |
+
max_redirects,
|
| 684 |
+
retries,
|
| 685 |
+
retry_delay,
|
| 686 |
+
proxies,
|
| 687 |
+
proxy,
|
| 688 |
+
proxy_auth,
|
| 689 |
+
auth,
|
| 690 |
+
verify,
|
| 691 |
+
cert,
|
| 692 |
+
impersonate,
|
| 693 |
+
http3,
|
| 694 |
+
stealthy_headers,
|
| 695 |
+
**kwargs,
|
| 696 |
+
)
|
| 697 |
+
|
| 698 |
+
def post(
|
| 699 |
+
self,
|
| 700 |
+
url: str,
|
| 701 |
+
data: Optional[Dict | str] = None,
|
| 702 |
+
json: Optional[Dict | List] = None,
|
| 703 |
+
headers: Optional[Mapping[str, Optional[str]]] = _UNSET,
|
| 704 |
+
params: Optional[Dict | List | Tuple] = None,
|
| 705 |
+
cookies: Optional[CookieTypes] = None,
|
| 706 |
+
timeout: Optional[int | float] = _UNSET,
|
| 707 |
+
follow_redirects: Optional[bool] = _UNSET,
|
| 708 |
+
max_redirects: Optional[int] = _UNSET,
|
| 709 |
+
retries: Optional[int] = _UNSET,
|
| 710 |
+
retry_delay: Optional[int] = _UNSET,
|
| 711 |
+
proxies: Optional[ProxySpec] = _UNSET,
|
| 712 |
+
proxy: Optional[str] = _UNSET,
|
| 713 |
+
proxy_auth: Optional[Tuple[str, str]] = _UNSET,
|
| 714 |
+
auth: Optional[Tuple[str, str]] = None,
|
| 715 |
+
verify: Optional[bool] = _UNSET,
|
| 716 |
+
cert: Optional[str | Tuple[str, str]] = _UNSET,
|
| 717 |
+
impersonate: Optional[BrowserTypeLiteral] = _UNSET,
|
| 718 |
+
http3: Optional[bool] = _UNSET,
|
| 719 |
+
stealthy_headers: Optional[bool] = _UNSET,
|
| 720 |
+
**kwargs,
|
| 721 |
+
) -> Response:
|
| 722 |
+
return super().post(
|
| 723 |
+
url,
|
| 724 |
+
data,
|
| 725 |
+
json,
|
| 726 |
+
headers,
|
| 727 |
+
params,
|
| 728 |
+
cookies,
|
| 729 |
+
timeout,
|
| 730 |
+
follow_redirects,
|
| 731 |
+
max_redirects,
|
| 732 |
+
retries,
|
| 733 |
+
retry_delay,
|
| 734 |
+
proxies,
|
| 735 |
+
proxy,
|
| 736 |
+
proxy_auth,
|
| 737 |
+
auth,
|
| 738 |
+
verify,
|
| 739 |
+
cert,
|
| 740 |
+
impersonate,
|
| 741 |
+
http3,
|
| 742 |
+
stealthy_headers,
|
| 743 |
+
**kwargs,
|
| 744 |
+
)
|
| 745 |
+
|
| 746 |
+
def put(
|
| 747 |
+
self,
|
| 748 |
+
url: str,
|
| 749 |
+
data: Optional[Dict | str] = None,
|
| 750 |
+
json: Optional[Dict | List] = None,
|
| 751 |
+
headers: Optional[Mapping[str, Optional[str]]] = _UNSET,
|
| 752 |
+
params: Optional[Dict | List | Tuple] = None,
|
| 753 |
+
cookies: Optional[CookieTypes] = None,
|
| 754 |
+
timeout: Optional[int | float] = _UNSET,
|
| 755 |
+
follow_redirects: Optional[bool] = _UNSET,
|
| 756 |
+
max_redirects: Optional[int] = _UNSET,
|
| 757 |
+
retries: Optional[int] = _UNSET,
|
| 758 |
+
retry_delay: Optional[int] = _UNSET,
|
| 759 |
+
proxies: Optional[ProxySpec] = _UNSET,
|
| 760 |
+
proxy: Optional[str] = _UNSET,
|
| 761 |
+
proxy_auth: Optional[Tuple[str, str]] = _UNSET,
|
| 762 |
+
auth: Optional[Tuple[str, str]] = None,
|
| 763 |
+
verify: Optional[bool] = _UNSET,
|
| 764 |
+
cert: Optional[str | Tuple[str, str]] = _UNSET,
|
| 765 |
+
impersonate: Optional[BrowserTypeLiteral] = _UNSET,
|
| 766 |
+
http3: Optional[bool] = _UNSET,
|
| 767 |
+
stealthy_headers: Optional[bool] = _UNSET,
|
| 768 |
+
**kwargs,
|
| 769 |
+
) -> Response:
|
| 770 |
+
return super().put(
|
| 771 |
+
url,
|
| 772 |
+
data,
|
| 773 |
+
json,
|
| 774 |
+
headers,
|
| 775 |
+
params,
|
| 776 |
+
cookies,
|
| 777 |
+
timeout,
|
| 778 |
+
follow_redirects,
|
| 779 |
+
max_redirects,
|
| 780 |
+
retries,
|
| 781 |
+
retry_delay,
|
| 782 |
+
proxies,
|
| 783 |
+
proxy,
|
| 784 |
+
proxy_auth,
|
| 785 |
+
auth,
|
| 786 |
+
verify,
|
| 787 |
+
cert,
|
| 788 |
+
impersonate,
|
| 789 |
+
http3,
|
| 790 |
+
stealthy_headers,
|
| 791 |
+
**kwargs,
|
| 792 |
+
)
|
| 793 |
+
|
| 794 |
+
def delete(
|
| 795 |
+
self,
|
| 796 |
+
url: str,
|
| 797 |
+
data: Optional[Dict | str] = None,
|
| 798 |
+
json: Optional[Dict | List] = None,
|
| 799 |
+
headers: Optional[Mapping[str, Optional[str]]] = _UNSET,
|
| 800 |
+
params: Optional[Dict | List | Tuple] = None,
|
| 801 |
+
cookies: Optional[CookieTypes] = None,
|
| 802 |
+
timeout: Optional[int | float] = _UNSET,
|
| 803 |
+
follow_redirects: Optional[bool] = _UNSET,
|
| 804 |
+
max_redirects: Optional[int] = _UNSET,
|
| 805 |
+
retries: Optional[int] = _UNSET,
|
| 806 |
+
retry_delay: Optional[int] = _UNSET,
|
| 807 |
+
proxies: Optional[ProxySpec] = _UNSET,
|
| 808 |
+
proxy: Optional[str] = _UNSET,
|
| 809 |
+
proxy_auth: Optional[Tuple[str, str]] = _UNSET,
|
| 810 |
+
auth: Optional[Tuple[str, str]] = None,
|
| 811 |
+
verify: Optional[bool] = _UNSET,
|
| 812 |
+
cert: Optional[str | Tuple[str, str]] = _UNSET,
|
| 813 |
+
impersonate: Optional[BrowserTypeLiteral] = _UNSET,
|
| 814 |
+
http3: Optional[bool] = _UNSET,
|
| 815 |
+
stealthy_headers: Optional[bool] = _UNSET,
|
| 816 |
+
**kwargs,
|
| 817 |
+
) -> Response:
|
| 818 |
+
return super().delete(
|
| 819 |
+
url,
|
| 820 |
+
data,
|
| 821 |
+
json,
|
| 822 |
+
headers,
|
| 823 |
+
params,
|
| 824 |
+
cookies,
|
| 825 |
+
timeout,
|
| 826 |
+
follow_redirects,
|
| 827 |
+
max_redirects,
|
| 828 |
+
retries,
|
| 829 |
+
retry_delay,
|
| 830 |
+
proxies,
|
| 831 |
+
proxy,
|
| 832 |
+
proxy_auth,
|
| 833 |
+
auth,
|
| 834 |
+
verify,
|
| 835 |
+
cert,
|
| 836 |
+
impersonate,
|
| 837 |
+
http3,
|
| 838 |
+
stealthy_headers,
|
| 839 |
+
**kwargs,
|
| 840 |
+
)
|
| 841 |
+
|
| 842 |
|
| 843 |
class AsyncFetcherClient(FetcherSession):
|
| 844 |
def __init__(self, *args, **kwargs):
|
|
|
|
| 848 |
self.__aenter__ = None
|
| 849 |
self.__aexit__ = None
|
| 850 |
self._async_curl_session = True
|
| 851 |
+
|
| 852 |
+
# Setting the correct return types for the type checking/autocompletion
|
| 853 |
+
def get(
|
| 854 |
+
self,
|
| 855 |
+
url: str,
|
| 856 |
+
params: Optional[Dict | List | Tuple] = None,
|
| 857 |
+
headers: Optional[Mapping[str, Optional[str]]] = _UNSET,
|
| 858 |
+
cookies: Optional[CookieTypes] = None,
|
| 859 |
+
timeout: Optional[int | float] = _UNSET,
|
| 860 |
+
follow_redirects: Optional[bool] = _UNSET,
|
| 861 |
+
max_redirects: Optional[int] = _UNSET,
|
| 862 |
+
retries: Optional[int] = _UNSET,
|
| 863 |
+
retry_delay: Optional[int] = _UNSET,
|
| 864 |
+
proxies: Optional[ProxySpec] = _UNSET,
|
| 865 |
+
proxy: Optional[str] = _UNSET,
|
| 866 |
+
proxy_auth: Optional[Tuple[str, str]] = _UNSET,
|
| 867 |
+
auth: Optional[Tuple[str, str]] = None,
|
| 868 |
+
verify: Optional[bool] = _UNSET,
|
| 869 |
+
cert: Optional[str | Tuple[str, str]] = _UNSET,
|
| 870 |
+
impersonate: Optional[BrowserTypeLiteral] = _UNSET,
|
| 871 |
+
http3: Optional[bool] = _UNSET,
|
| 872 |
+
stealthy_headers: Optional[bool] = _UNSET,
|
| 873 |
+
**kwargs,
|
| 874 |
+
) -> Awaitable[Response]:
|
| 875 |
+
return super().get(
|
| 876 |
+
url,
|
| 877 |
+
params,
|
| 878 |
+
headers,
|
| 879 |
+
cookies,
|
| 880 |
+
timeout,
|
| 881 |
+
follow_redirects,
|
| 882 |
+
max_redirects,
|
| 883 |
+
retries,
|
| 884 |
+
retry_delay,
|
| 885 |
+
proxies,
|
| 886 |
+
proxy,
|
| 887 |
+
proxy_auth,
|
| 888 |
+
auth,
|
| 889 |
+
verify,
|
| 890 |
+
cert,
|
| 891 |
+
impersonate,
|
| 892 |
+
http3,
|
| 893 |
+
stealthy_headers,
|
| 894 |
+
**kwargs,
|
| 895 |
+
)
|
| 896 |
+
|
| 897 |
+
def post(
|
| 898 |
+
self,
|
| 899 |
+
url: str,
|
| 900 |
+
data: Optional[Dict | str] = None,
|
| 901 |
+
json: Optional[Dict | List] = None,
|
| 902 |
+
headers: Optional[Mapping[str, Optional[str]]] = _UNSET,
|
| 903 |
+
params: Optional[Dict | List | Tuple] = None,
|
| 904 |
+
cookies: Optional[CookieTypes] = None,
|
| 905 |
+
timeout: Optional[int | float] = _UNSET,
|
| 906 |
+
follow_redirects: Optional[bool] = _UNSET,
|
| 907 |
+
max_redirects: Optional[int] = _UNSET,
|
| 908 |
+
retries: Optional[int] = _UNSET,
|
| 909 |
+
retry_delay: Optional[int] = _UNSET,
|
| 910 |
+
proxies: Optional[ProxySpec] = _UNSET,
|
| 911 |
+
proxy: Optional[str] = _UNSET,
|
| 912 |
+
proxy_auth: Optional[Tuple[str, str]] = _UNSET,
|
| 913 |
+
auth: Optional[Tuple[str, str]] = None,
|
| 914 |
+
verify: Optional[bool] = _UNSET,
|
| 915 |
+
cert: Optional[str | Tuple[str, str]] = _UNSET,
|
| 916 |
+
impersonate: Optional[BrowserTypeLiteral] = _UNSET,
|
| 917 |
+
http3: Optional[bool] = _UNSET,
|
| 918 |
+
stealthy_headers: Optional[bool] = _UNSET,
|
| 919 |
+
**kwargs,
|
| 920 |
+
) -> Awaitable[Response]:
|
| 921 |
+
return super().post(
|
| 922 |
+
url,
|
| 923 |
+
data,
|
| 924 |
+
json,
|
| 925 |
+
headers,
|
| 926 |
+
params,
|
| 927 |
+
cookies,
|
| 928 |
+
timeout,
|
| 929 |
+
follow_redirects,
|
| 930 |
+
max_redirects,
|
| 931 |
+
retries,
|
| 932 |
+
retry_delay,
|
| 933 |
+
proxies,
|
| 934 |
+
proxy,
|
| 935 |
+
proxy_auth,
|
| 936 |
+
auth,
|
| 937 |
+
verify,
|
| 938 |
+
cert,
|
| 939 |
+
impersonate,
|
| 940 |
+
http3,
|
| 941 |
+
stealthy_headers,
|
| 942 |
+
**kwargs,
|
| 943 |
+
)
|
| 944 |
+
|
| 945 |
+
def put(
|
| 946 |
+
self,
|
| 947 |
+
url: str,
|
| 948 |
+
data: Optional[Dict | str] = None,
|
| 949 |
+
json: Optional[Dict | List] = None,
|
| 950 |
+
headers: Optional[Mapping[str, Optional[str]]] = _UNSET,
|
| 951 |
+
params: Optional[Dict | List | Tuple] = None,
|
| 952 |
+
cookies: Optional[CookieTypes] = None,
|
| 953 |
+
timeout: Optional[int | float] = _UNSET,
|
| 954 |
+
follow_redirects: Optional[bool] = _UNSET,
|
| 955 |
+
max_redirects: Optional[int] = _UNSET,
|
| 956 |
+
retries: Optional[int] = _UNSET,
|
| 957 |
+
retry_delay: Optional[int] = _UNSET,
|
| 958 |
+
proxies: Optional[ProxySpec] = _UNSET,
|
| 959 |
+
proxy: Optional[str] = _UNSET,
|
| 960 |
+
proxy_auth: Optional[Tuple[str, str]] = _UNSET,
|
| 961 |
+
auth: Optional[Tuple[str, str]] = None,
|
| 962 |
+
verify: Optional[bool] = _UNSET,
|
| 963 |
+
cert: Optional[str | Tuple[str, str]] = _UNSET,
|
| 964 |
+
impersonate: Optional[BrowserTypeLiteral] = _UNSET,
|
| 965 |
+
http3: Optional[bool] = _UNSET,
|
| 966 |
+
stealthy_headers: Optional[bool] = _UNSET,
|
| 967 |
+
**kwargs,
|
| 968 |
+
) -> Awaitable[Response]:
|
| 969 |
+
return super().put(
|
| 970 |
+
url,
|
| 971 |
+
data,
|
| 972 |
+
json,
|
| 973 |
+
headers,
|
| 974 |
+
params,
|
| 975 |
+
cookies,
|
| 976 |
+
timeout,
|
| 977 |
+
follow_redirects,
|
| 978 |
+
max_redirects,
|
| 979 |
+
retries,
|
| 980 |
+
retry_delay,
|
| 981 |
+
proxies,
|
| 982 |
+
proxy,
|
| 983 |
+
proxy_auth,
|
| 984 |
+
auth,
|
| 985 |
+
verify,
|
| 986 |
+
cert,
|
| 987 |
+
impersonate,
|
| 988 |
+
http3,
|
| 989 |
+
stealthy_headers,
|
| 990 |
+
**kwargs,
|
| 991 |
+
)
|
| 992 |
+
|
| 993 |
+
def delete(
|
| 994 |
+
self,
|
| 995 |
+
url: str,
|
| 996 |
+
data: Optional[Dict | str] = None,
|
| 997 |
+
json: Optional[Dict | List] = None,
|
| 998 |
+
headers: Optional[Mapping[str, Optional[str]]] = _UNSET,
|
| 999 |
+
params: Optional[Dict | List | Tuple] = None,
|
| 1000 |
+
cookies: Optional[CookieTypes] = None,
|
| 1001 |
+
timeout: Optional[int | float] = _UNSET,
|
| 1002 |
+
follow_redirects: Optional[bool] = _UNSET,
|
| 1003 |
+
max_redirects: Optional[int] = _UNSET,
|
| 1004 |
+
retries: Optional[int] = _UNSET,
|
| 1005 |
+
retry_delay: Optional[int] = _UNSET,
|
| 1006 |
+
proxies: Optional[ProxySpec] = _UNSET,
|
| 1007 |
+
proxy: Optional[str] = _UNSET,
|
| 1008 |
+
proxy_auth: Optional[Tuple[str, str]] = _UNSET,
|
| 1009 |
+
auth: Optional[Tuple[str, str]] = None,
|
| 1010 |
+
verify: Optional[bool] = _UNSET,
|
| 1011 |
+
cert: Optional[str | Tuple[str, str]] = _UNSET,
|
| 1012 |
+
impersonate: Optional[BrowserTypeLiteral] = _UNSET,
|
| 1013 |
+
http3: Optional[bool] = _UNSET,
|
| 1014 |
+
stealthy_headers: Optional[bool] = _UNSET,
|
| 1015 |
+
**kwargs,
|
| 1016 |
+
) -> Awaitable[Response]:
|
| 1017 |
+
return super().delete(
|
| 1018 |
+
url,
|
| 1019 |
+
data,
|
| 1020 |
+
json,
|
| 1021 |
+
headers,
|
| 1022 |
+
params,
|
| 1023 |
+
cookies,
|
| 1024 |
+
timeout,
|
| 1025 |
+
follow_redirects,
|
| 1026 |
+
max_redirects,
|
| 1027 |
+
retries,
|
| 1028 |
+
retry_delay,
|
| 1029 |
+
proxies,
|
| 1030 |
+
proxy,
|
| 1031 |
+
proxy_auth,
|
| 1032 |
+
auth,
|
| 1033 |
+
verify,
|
| 1034 |
+
cert,
|
| 1035 |
+
impersonate,
|
| 1036 |
+
http3,
|
| 1037 |
+
stealthy_headers,
|
| 1038 |
+
**kwargs,
|
| 1039 |
+
)
|
scrapling/fetchers/requests.py
CHANGED
|
@@ -1,17 +1,9 @@
|
|
| 1 |
-
from scrapling.core._types import (
|
| 2 |
-
Callable,
|
| 3 |
-
Dict,
|
| 4 |
-
List,
|
| 5 |
-
Optional,
|
| 6 |
-
SelectorWaitStates,
|
| 7 |
-
Iterable,
|
| 8 |
-
)
|
| 9 |
from scrapling.engines.static import (
|
| 10 |
FetcherSession,
|
| 11 |
FetcherClient as _FetcherClient,
|
| 12 |
AsyncFetcherClient as _AsyncFetcherClient,
|
| 13 |
)
|
| 14 |
-
from scrapling.engines.toolbelt.custom import BaseFetcher
|
| 15 |
|
| 16 |
|
| 17 |
__FetcherClientInstance__ = _FetcherClient()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from scrapling.engines.static import (
|
| 2 |
FetcherSession,
|
| 3 |
FetcherClient as _FetcherClient,
|
| 4 |
AsyncFetcherClient as _AsyncFetcherClient,
|
| 5 |
)
|
| 6 |
+
from scrapling.engines.toolbelt.custom import BaseFetcher
|
| 7 |
|
| 8 |
|
| 9 |
__FetcherClientInstance__ = _FetcherClient()
|