Open tommybbq opened 3 months ago
Food.com has changed the URI for each recipe by moving from straight id to hyphenated name then id, so the tutorial site needs to be changed.
example: old url: https://www.food.com/recipe/164636 new, working url: https://www.food.com/recipe/1-1-1-tempura-batter-164636
It's easy to fix in the notebooks:
df['hyphen'] = df['name'].str.replace(' ', '-')
df['newID'] = df['hyphen'] + '-' + df['id'].astype(str)
df = df.drop(columns=['id', 'hyphen'])
df = df.rename(columns={'newID': 'id'})
I'm submitting a
Current Behaviour:
Food.com has changed the URI for each recipe by moving from straight id to hyphenated name then id, so the tutorial site needs to be changed.
example: old url: https://www.food.com/recipe/164636 new, working url: https://www.food.com/recipe/1-1-1-tempura-batter-164636
It's easy to fix in the notebooks:
create column 'hyphen' that converts spaces to hyphens in the 'name' column
df['hyphen'] = df['name'].str.replace(' ', '-')
create column 'newID' that concatenates 'id' and 'hyphen' columns
df['newID'] = df['hyphen'] + '-' + df['id'].astype(str)
drop id and hyphen columns
df = df.drop(columns=['id', 'hyphen'])
rename newID column to id
df = df.rename(columns={'newID': 'id'})