Hey everyone, I am working on a project, a dumb project, but a project none the less, for the fun of it. I am trying to make a console based web browser. Yes, the code has recursion, don't pay it no mind, its how I prefer it, its for me after all in the end (lol) but here's what I am trying to do next, Im able to get the source code from pages, what I want next is that which takes out HTML tags, if there are line breaks, itll listen to that, just no objects or images. The ultimate goal is to allow for text boxes as input() methods and hyperlinks with that somehow would be absolutely amazing, but I am not too certain that would work, maybe something like showing the url of the hyperlink (which i know would be easily done)
well, here's the small amount of code I have set up.
Code: Select all
import urllib.request
#currently working on a text based browser, no frills, no images
#all in console.
#python 3
def main():
#request url from user
urlGo = input('url:')
#get url loaded
fp = urllib.request.urlopen(urlGo)
#read url
mybytes = fp.read()
#decode it
mystr = mybytes.decode("utf8")
#display it
print(mystr)
main()
main()