Answers for "BeautifulSoup : Fetched all the links on a webpage how to navigate through them without selenium"

0

BeautifulSoup : Fetched all the links on a webpage how to navigate through them without selenium

import requests
from bs4 import BeautifulSoup

base_url_f = "https://www.yifysubtitles.com"
search_url = base_url_f + "/search?q=last+jedi"
resp = requests.get(search_url)
soup = BeautifulSoup(resp.text, 'lxml')
for media in soup.find_all("div", {"class": "media-body"}):
    print(base_url_f + media.find('a')['href'])
Posted by: Guest on May-08-2022

Code answers related to "BeautifulSoup : Fetched all the links on a webpage how to navigate through them without selenium"

Python Answers by Framework

Browse Popular Code Answers by Language