Compare commits

..

No commits in common. "8e17ee393217b6ac9c5fa5e596423e166b8c585b" and "0615bb96eafc8ffae468f6b12aaeb1bb3c99ce23" have entirely different histories.

2 changed files with 2 additions and 8 deletions

View File

@ -1,6 +1,5 @@
{ {
"conventionalCommits.scopes": [ "conventionalCommits.scopes": [
"api", "api"
"recipe"
] ]
} }

View File

@ -15,11 +15,6 @@ def get_recipe_from_xiachufang(url):
steps = [] steps = []
for step in soup.find('div', class_='steps').find('ol').find_all('li'): for step in soup.find('div', class_='steps').find('ol').find_all('li'):
step_text = step.find('p').text.strip() steps.append([step.find('p').text.strip(), step.find('img')['src']])
step_img = step.find('img')
if step_img:
steps.append([step_text, step_img['src']])
else:
steps.append([step_text])
return {'name': name, 'ingredients': ingredients, 'steps': steps} return {'name': name, 'ingredients': ingredients, 'steps': steps}