mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-11-23 20:11:07 +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 |