Skip to content

Commit 44ed2f7

Browse files
authored
Add files via upload
1 parent e7774d6 commit 44ed2f7

4 files changed

Lines changed: 4 additions & 20 deletions

File tree

pywwwget_chatgpt.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,10 +2268,6 @@ def download_file_from_http_file(url, headers=None, usehttp=__use_http_lib__, re
22682268
else:
22692269
headers.update({'Referer': httpreferer})
22702270

2271-
if(usehttp == "pycurl"):
2272-
if(isinstance(headers, dict)):
2273-
headers = make_http_headers_from_dict_to_pycurl(headers)
2274-
22752271
socket.setdefaulttimeout(float(timeout))
22762272
start_time = time.time()
22772273

@@ -2663,7 +2659,7 @@ def download_file_from_http_file(url, headers=None, usehttp=__use_http_lib__, re
26632659
http.clear()
26642660
httpsession = None
26652661

2666-
elif(usehttp == "pycurl"):
2662+
elif(usehttp == "pycurl" and havepycurl):
26672663
retrieved_body = MkTempFile()
26682664
retrieved_headers = MkTempFile()
26692665
sentout_headers = MkTempFile()

pywwwget_deepseek.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,10 +2383,6 @@ def download_file_from_http_file(url, headers=None, usehttp=__use_http_lib__, re
23832383
else:
23842384
headers.update({'Referer': httpreferer})
23852385

2386-
if(usehttp == "pycurl"):
2387-
if(isinstance(headers, dict)):
2388-
headers = make_http_headers_from_dict_to_pycurl(headers)
2389-
23902386
socket.setdefaulttimeout(float(timeout))
23912387
start_time = time.time()
23922388

@@ -2778,7 +2774,7 @@ def download_file_from_http_file(url, headers=None, usehttp=__use_http_lib__, re
27782774
http.clear()
27792775
httpsession = None
27802776

2781-
elif(usehttp == "pycurl"):
2777+
elif(usehttp == "pycurl" and havepycurl):
27822778
retrieved_body = MkTempFile()
27832779
retrieved_headers = MkTempFile()
27842780
sentout_headers = MkTempFile()

pywwwget_merged.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2303,10 +2303,6 @@ def download_file_from_http_file(url, headers=None, usehttp=__use_http_lib__, re
23032303
else:
23042304
headers.update({'Referer': httpreferer})
23052305

2306-
if(usehttp == "pycurl"):
2307-
if(isinstance(headers, dict)):
2308-
headers = make_http_headers_from_dict_to_pycurl(headers)
2309-
23102306
socket.setdefaulttimeout(float(timeout))
23112307
start_time = time.time()
23122308

@@ -2698,7 +2694,7 @@ def download_file_from_http_file(url, headers=None, usehttp=__use_http_lib__, re
26982694
http.clear()
26992695
httpsession = None
27002696

2701-
elif(usehttp == "pycurl"):
2697+
elif(usehttp == "pycurl" and havepycurl):
27022698
retrieved_body = MkTempFile()
27032699
retrieved_headers = MkTempFile()
27042700
sentout_headers = MkTempFile()

pywwwget_nextver.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,10 +2284,6 @@ def download_file_from_http_file(url, headers=None, usehttp=__use_http_lib__, re
22842284
else:
22852285
headers.update({'Referer': httpreferer})
22862286

2287-
if(usehttp == "pycurl"):
2288-
if(isinstance(headers, dict)):
2289-
headers = make_http_headers_from_dict_to_pycurl(headers)
2290-
22912287
socket.setdefaulttimeout(float(timeout))
22922288
start_time = time.time()
22932289

@@ -2679,7 +2675,7 @@ def download_file_from_http_file(url, headers=None, usehttp=__use_http_lib__, re
26792675
http.clear()
26802676
httpsession = None
26812677

2682-
elif(usehttp == "pycurl"):
2678+
elif(usehttp == "pycurl" and havepycurl):
26832679
retrieved_body = MkTempFile()
26842680
retrieved_headers = MkTempFile()
26852681
sentout_headers = MkTempFile()

0 commit comments

Comments
 (0)