# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import requests
import pandas as pd

page = requests.get("https://solicitors.lawsociety.org.uk/person/130606")

page.status_code

# +
df_summary = pd.DataFrame()

for index in range(3000, 4000):
    
    page = requests.get("https://solicitors.lawsociety.org.uk/person/"+str(index))
    data = {'index': index, 'status': page.status_code}
    df_new = pd.DataFrame.from_records([data])
    df_summary = df_summary.append(df_new) 
    print('-', end='')
# -

df_summary.status.value_counts()

df = df.append(df_summary)

df.status.value_counts()

df.loc[df.status == 200]

# +
from bs4 import BeautifulSoup

soup = BeautifulSoup(page.content, 'html.parser')
# -

soup.find('div', id='languages-spoken-accordion').get_text().strip()



StarcoderdataJupyterScriptsDedupFiltered