Awesome-Python-Scripts/SimpleWebpageParser/SimpleWebpageParser.py

13 lines
236 B
Python
Raw Permalink Normal View History

2018-10-09 19:36:59 +00:00
import requests
from bs4 import BeautifulSoup
class SimpleWebpageParser():
def __init__(self, url):
self.url = url
def getHTML(self):
r = requests.get(self.url)
data = r.text
soup = BeautifulSoup(data,"lxml")
return soup