BeautifulSoup Python: Get The Text With No Tags And Get The Adjacent Links
I am trying to extract the movie titles and links for it from this site from bs4 import BeautifulSoup from requests import get link = 'https://tamilrockerrs.ch' r = get(link).con
Solution 1:
You can find title
and link
by this way.
from bs4 import BeautifulSoup
import requests
url= "http://tamilrockerrs.ch"
response= requests.get(url)
data = response.text
soup = BeautifulSoup(data, 'html.parser')
data = soup.find_all('div', {"class":"title"})
for film in data:
print("Title:", film.find('a').text) # get the title here
print("Link:", film.find('a').get("href")) #get the link here
Post a Comment for "BeautifulSoup Python: Get The Text With No Tags And Get The Adjacent Links"