Compare commits
No commits in common. "8e17ee393217b6ac9c5fa5e596423e166b8c585b" and "0615bb96eafc8ffae468f6b12aaeb1bb3c99ce23" have entirely different histories.
8e17ee3932
...
0615bb96ea
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,6 +1,5 @@
|
||||
{
|
||||
"conventionalCommits.scopes": [
|
||||
"api",
|
||||
"recipe"
|
||||
"api"
|
||||
]
|
||||
}
|
||||
|
||||
@ -15,11 +15,6 @@ def get_recipe_from_xiachufang(url):
|
||||
|
||||
steps = []
|
||||
for step in soup.find('div', class_='steps').find('ol').find_all('li'):
|
||||
step_text = step.find('p').text.strip()
|
||||
step_img = step.find('img')
|
||||
if step_img:
|
||||
steps.append([step_text, step_img['src']])
|
||||
else:
|
||||
steps.append([step_text])
|
||||
steps.append([step.find('p').text.strip(), step.find('img')['src']])
|
||||
|
||||
return {'name': name, 'ingredients': ingredients, 'steps': steps}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user