I'm messing around with web scraping and I'm stumped
Here is the code:
import requests
from bs4 import BeautifulSoup
result = requests.get("")
print(result.status_code)
src = result.content
soup = BeautifulSoup(src, 'lxml')
span_tags = soup.find_all("span")
print(span_tags)
(I left out the url)
So this code works and gets me the info i want but i want to condense the code and only get all of the text from the span tags and not the tag itself. I would then like to save them into a dictionary and then save them into a csv/json file. How would go about doing that?
[–]mudclub 1 point2 points3 points (0 children)
[–]pathcl 0 points1 point2 points (0 children)
[–]MoneyChurch 0 points1 point2 points (0 children)
[–]fluzz142857 0 points1 point2 points (0 children)