+ 1

Using urllib to grab some html in a simple python program. Can anybody tell me what I am doing wrong?

I am using this URL: (copy and paste for program input) http://www.brainjar.com/java/host/test.html here is the code: https://code.sololearn.com/c9aTHjumrpES/?ref=app copied example code from https://docs.python.org/3/howto/urllib2.html#urllib-howto

4th Oct 2017, 5:49 AM
Ben-Davis
Ben-Davis - avatar
8 odpowiedzi
+ 1
do this if "://" in text :
4th Oct 2017, 7:02 AM
sayan chandra
sayan chandra - avatar
+ 1
thanks @Sayan I fixed that, now I am back to my original problem... what is happening with urllib?
4th Oct 2017, 7:15 AM
Ben-Davis
Ben-Davis - avatar
+ 1
I guess in the long run "yes", right now I would like to know just enough why it is failing... a typo in my part, an issue with Sololearn or some other?
4th Oct 2017, 7:19 AM
Ben-Davis
Ben-Davis - avatar
+ 1
it appears some of my problems are with playgroundn not being patient enough to wait for http response, and also some problems with my data connection. I have just managed to get html back from the request
4th Oct 2017, 7:29 AM
Ben-Davis
Ben-Davis - avatar
+ 1
it appears some of my problems are with playgroundn not being patient enough to wait for http response, and also some problems with my data connection. I have just managed to get html back from the request
4th Oct 2017, 7:30 AM
Ben-Davis
Ben-Davis - avatar
0
whats happening with urllib...means.. u want to know the working of the module????
4th Oct 2017, 7:16 AM
sayan chandra
sayan chandra - avatar
0
urllib.request module------|||| https://docs.python.org/3/library/urllib.request.html?_e_pi_=7%2CPAGE_ID10%2C1802145081
4th Oct 2017, 7:19 AM
sayan chandra
sayan chandra - avatar
- 1
your code is doing 2 things.. if its not a url simply omitting vowels if it is a url then its taking the sentence part of that url..accessing it then doing same vowel omitting
4th Oct 2017, 7:21 AM
sayan chandra
sayan chandra - avatar