i have a python script that simply get file content from a specific URL and show the content using print command.
This is what actually i done:
from urllib.request import urlopen
import urllib
url = "http://www.mywebsite/file.txt"
req = urllib.request.Request(url)
with urllib.request.urlopen(req) as f:
resp = f.read().decode('utf-8')
print(resp)
When i print resp
i see correctly the content of the file. Now, i would like to iterate line by line the content or resp in order to perform some string check for each row iterated.
Can you help me please? thank in advance