OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

getting none as output instead of the print error while executing the code with the span [closed]

  • Thread starter Thread starter MADASU VINEETH RAO
  • Start date Start date
M

MADASU VINEETH RAO

Guest
from bs4 import BeautifulSoup import requests

html_text = requests.get( 'https://in.kompass.com/r/tamil-nadu/in_intn/' ).text

soup = BeautifulSoup(html_text,'lxml')

location = soup.find ('span',class_= 'placeText')

print(location)

PS C:\Users\vinny\OneDrive\Desktop\bs4project> & C:/Users/vinny/AppData/Local/Programs/Python/Python312/python.exe c:/Users/vinny/OneDrive/Desktop/bs4project/main.py None
<p>from bs4 import BeautifulSoup
import requests</p>
<p>html_text = requests.get( 'https://in.kompass.com/r/tamil-nadu/in_intn/' ).text</p>
<p>soup = BeautifulSoup(html_text,'lxml')</p>
<p>location = soup.find ('span',class_= 'placeText')</p>
<p>print(location)</p>
<p>PS C:\Users\vinny\OneDrive\Desktop\bs4project> & C:/Users/vinny/AppData/Local/Programs/Python/Python312/python.exe c:/Users/vinny/OneDrive/Desktop/bs4project/main.py
None</p>
 
Top