Hello,
Can BeautifulSoup grab what's between the brackets ("John Doe") in the following line?
--
Edit: Found it
Can BeautifulSoup grab what's between the brackets ("John Doe") in the following line?
from bs4 import BeautifulSoup with open("input.txt") as fp: soup = BeautifulSoup(fp, 'html.parser') #<a href="/authorx/john_doe">John Doe</a>Thank you.
--
Edit: Found it
items = soup.select("a[href*=authorx]") for item in items: #print(item) print(item.string)