You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is what my code looked like -
it is set to ignore the SSL Certifications which could have created errors.
import urllib.request
from bs4 import BeautifulSoup
url = 'http://py4e-data.dr-chuck.net/known_by_Nia.html'
count = int(input('Enter count:'))
position = int(input('Enter position:'))
postion=int(position)-1
html = urllib.request.urlopen(url)
html = html.read()
for i in range(count):
print ("Retrieving:",href[i])
link = href[position].get('href', None)
result = (href[position].contents[0])
html = urllib.request.urlopen(url)
html = html.read()
soup = BeautifulSoup(html,"html.parser")
href = soup('a')
print(result)
The text was updated successfully, but these errors were encountered:
This is what my code looked like -
it is set to ignore the SSL Certifications which could have created errors.
import urllib.request
from bs4 import BeautifulSoup
url = 'http://py4e-data.dr-chuck.net/known_by_Nia.html'
count = int(input('Enter count:'))
position = int(input('Enter position:'))
postion=int(position)-1
html = urllib.request.urlopen(url)
html = html.read()
soup = BeautifulSoup(html,"html.parser")
href = soup('a')
#print ("Retrieving:",href)
for i in range(count):
print ("Retrieving:",href[i])
link = href[position].get('href', None)
result = (href[position].contents[0])
html = urllib.request.urlopen(url)
html = html.read()
soup = BeautifulSoup(html,"html.parser")
href = soup('a')
print(result)
The text was updated successfully, but these errors were encountered: