Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (10 sloc) 721 Bytes
import requests
from bs4 import BeautifulSoup
r = requests.get("https://www.thegardenfoodmarket.com/our-menus")
soup = BeautifulSoup(r.text, "html.parser")
getMenuButton = "comp-je6l6o2ylabel"
print("soup = " + str(soup))
getMenuButtonLink = soup.find("a", {"id": "comp-je6l6o2ylink"})
print("\n\ngetMenuButtonLink = " + str(getMenuButtonLink))
print("\n\ngetMenuButton's Actual Link = " + getMenuButtonLink["href"])
# <a href="https://docs.wixstatic.com/ugd/87f608_5e3b78450ee948698a40efcef65b94d5.pdf" target="_blank" data-type="document" role="button" id="comp-je6l6o2ylink" class="g-transparent-a style-je6l6o2vlink"><span id="comp-je6l6o2ylabel" class="style-je6l6o2vlabel">Try Me</span></a>
You can’t perform that action at this time.