Awesome-Python-Scripts/SimpleWebpageParser/SimpleWebpageParser.py
2018-10-10 01:06:59 +05:30

13 lines
236 B
Python

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