mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-07 13:02:27 +02:00
Tweak output formatting of get_file_by_url
This commit is contained in:
parent
beca76acfe
commit
9380fe534e
@ -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.splitlines()]) + "\n"
|
||||
res_text = "\n".join([domain_to_idna(line) for line in req.text.split("\n")])
|
||||
return res_text
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user