mercredi 24 juin 2020

BeautifulSoup gives None When using find_all()

import pandas as pd
import numpy as np
from bs4 import BeautifulSoup
import requests
import urllib
import csv,datetime,re

url_ = "https://www.wunderground.com/history/daily/ca/toronto/CYTZ/date/2016-6-25"
mypage = requests.get(url_).text
soup = BeautifulSoup(mypage,'html.parser')
soup.find_all('tr')

I was trying to fetch the weather data from wunderground. BeautifulSoup has fetched the source code but I don't know why when I use soup.find_all('tr') it keeps on giving me [] ('None'). Anyone know why?

Thank you!




Aucun commentaire:

Enregistrer un commentaire