Created
October 28, 2022 12:54
-
-
Save adacable/72af4136b427254a121e92620ef7f2b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
urlbase = "https://www.powercut105.com/FindOperator?Postcode=" | |
def getalpha(postcode): | |
postcodeList = postcode.split(" ") | |
url = urlbase + "+".join(postcodeList) | |
r = requests.get(url) | |
return BeautifulSoup(r.content,"html.parser").find("span",class_="highlight_blockletter").text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment