New guy here, I am currently writing a web scraper for an exercise and I have encountered a problem with extracting the url to re-use. Basically I managed to get the URL but when I print it, it is still showing the [' ']
(for example: ['http://123.com']
so it cannot be used as an input.
I am extracting the string using re.findall but then I tried to use .strip and .replace but it's I'm either getting a traceback or the input remains the same. Any suggestions please?
Extract:
z = re.findall(r'(?=htt).*?(?<=htm)', y)
h = str(z)
h = h.strip('\['"')
print(h)