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:
beca76a
)
Tweak output formatting of get_file_by_url
author
Alexander Cecile
<redacted>
Fri, 21 Aug 2020 18:44:27 +0000
(14:44 -0400)
committer
Alexander Cecile
<redacted>
Fri, 21 Aug 2020 18:44:27 +0000
(14:44 -0400)
updateHostsFile.py
patch
|
blob
|
history
diff --git
a/updateHostsFile.py
b/updateHostsFile.py
index cace08485040a4427fe977c35df8d00f54608e7a..cee883237afc8f45aa6be307579b5a1670efd071 100644
(file)
--- a/
updateHostsFile.py
+++ b/
updateHostsFile.py
@@
-1482,10
+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.split
lines()]) + "\n"
+ res_text = "\n".join([domain_to_idna(line) for line in req.text.split
("\n")])
return res_text
git clone https://git.99rst.org/PROJECT