I am trying to create a webscraper with BS4 that will grab a specific date . I was able to build the webscraper but it is pulling the wrong dates.
The trouble I am running into is that they share the same class, I tried by id but i get a return results of []. How else can I specify this date and not others?
import requests from bs4 import BeautifulSoup URL = 'https://nemsis.org/state-data-managers/state-map-v3/colorado' page = requests.get(URL) soup = BeautifulSoup(page.content, 'html.parser') date = soup.find('span',class_='state-updated-on') date = date.text print(date)
and it returns February 16, 2017
but I am looking for 09/04/2019
没有评论:
发表评论