()
Check weather.gov to see if it is likely to rain today.
Check weather.gov to see if it is likely to rain today.
Check weather . gov to see if it is likely to rain today .
def rain_check():
    """Check weather.gov to see if it is likely to rain today."""
    url = 'https://weather.com/en-GB/'
    res = requests.get(url)
    res.raise_for_status()
    soup = bs4.BeautifulSoup(res.text, 'lxml')
    weather_elem = soup.select('#styles-xz0ANuUJ_nowBlurb_17gst')
    weather = weather_elem[0].getText()

    if 'rain' in weather.lower():
        return True
def rain_check ( ) : url = 'https://weather.com/en-GB/' res = requests . get ( url ) res . raise_for_status ( ) soup = bs4 . BeautifulSoup ( res . text , 'lxml' ) weather_elem = soup . select ( '#styles-xz0ANuUJ_nowBlurb_17gst' ) weather = weather_elem [ 0 ] . getText ( ) if 'rain' in weather . lower ( ) : return True