git.99rst.org
/
stevenblack-hosts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
4fefecf
)
Tweak get_file_by_url
author
Alexander Cecile
<redacted>
Fri, 21 Aug 2020 00:00:36 +0000
(20:00 -0400)
committer
Alexander Cecile
<redacted>
Fri, 21 Aug 2020 00:00:36 +0000
(20:00 -0400)
updateHostsFile.py
patch
|
blob
|
history
diff --git
a/updateHostsFile.py
b/updateHostsFile.py
index 85aa25d74a79800bb455f538b2f2320cc25a05b2..cace08485040a4427fe977c35df8d00f54608e7a 100644
(file)
--- a/
updateHostsFile.py
+++ b/
updateHostsFile.py
@@
-1482,9
+1482,10
@@
def get_file_by_url(url, params=None, **kwargs):
-------
content: str
"""
+
req = requests.get(url=url, params=params, **kwargs)
req.encoding = req.apparent_encoding
- res_text = "\n".join([domain_to_idna(line) for line in req.text.splitlines()])
+ res_text = "\n".join([domain_to_idna(line) for line in req.text.splitlines()])
+ "\n"
return res_text
git clone https://git.99rst.org/PROJECT