Python Forum

Full Version: Web Scraping help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
    import requests
    from bs4 import BeautifulSoup
 
    url = 'http://thefuckingweather.com/Where/10468'
    url_get = requests.get(url)
    soup = BeautifulSoup(html, 'html.parser')
    print(soup.select('temperature jsMainTemp').text.strip())
I'm trying to get the temperature data from any weather website. I can't seem to get it working due to a error saying AttributeError: 'list' object has no attribute 'text'
What is that url???
Where the 'html' in soup = BeautifulSoup(html, 'html.parser') comes from?
The page source is in the 'url_get' object. You can get it with url_get.content
There doesnt seem to be any way to get any info from that site, at least for me. When i input a zip code, it just reroutes me back to /NoWhere even if i link your url.