The Open University

Making Code toolbox

Happy making!

Link to the Python Notebook with the code of today

In Azure

You will need to login with OUCU@open.ac.uk/password

https://notebooks.azure.com/mcancellieri/libraries/making-code-workshop

In Colab

https://drive.google.com/open?id=1JmJ5pgCVIJQAmEMd0oxVv53bvpmoFjJR

https://colab.research.google.com/drive/1JmJ5pgCVIJQAmEMd0oxVv53bvpmoFjJR

Url for live scraping

https://www.starbucks.com/menu/catalog/product?drink=espresso#view_control=product
 

Challenge #1

http://cotswoldjam.org/downloads/

Challenge #2

https://trinket.io/library/trinkets/a29485e969

Challenge #3

https://drive.google.com/open?id=1MXfwCl5WxjiwGHyQd-3vHksoB57Ms4KH


import requests
from bs4 import BeautifulSoup

response = requests.get('https://www.starbucks.com/menu/catalog/product?drink=espresso#view_control=product')

soup = BeautifulSoup(response.content, "html.parser")
drinks = soup.find(class_="drinks")
coffees = drinks.findAll("strong")
for coffee in coffees:
print(coffee.text)