mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-12-18 16:20:14 +00:00
13 lines
236 B
Python
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
|