Kumakaja Kumakaja - 5 months ago 46
Python Question

BeautifulSoup html -- load from memory?

I'm using

in python 3.5 to parse html. While I can load it from file, I need to load it from memory because I get from an HTTP request. I've google but found nothing loading html to BeautifulSoup from memory. Is it possible?

from BeautifulSoup import BeautifulSoup
import requests

data = requests.get('https://google.com').text
soup = BeautifulSoup(data)