By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
Top 100 RecipesTop 100 RecipesTop 100 Recipes
  • Home
  • Recipes
  • Keto Food
  • Vegan Food
  • Dessert
  • Drinks
  • Videos
Reading: Creamy Instant Pot Mexican Rice (Cookies & Cups)
Share
Notification Show More
Top 100 RecipesTop 100 Recipes
Search
  • Home
  • Recipes
  • Keto Food
  • Vegan Food
  • Dessert
  • Drinks
  • Videos
Follow US
© 2024 All Rights Reserved | Powered By Top 100 Recipes.
Top 100 Recipes > Recipes > Creamy Instant Pot Mexican Rice (Cookies & Cups)
Recipes

Creamy Instant Pot Mexican Rice (Cookies & Cups)

July 7, 2025
Share
10 Min Read
Instant Pot Mexican Rice | Cookies and Cups
SHARE

I’ll help you parse this recipe content using Python and BeautifulSoup. Here’s a solution:

“`python
from bs4 import BeautifulSoup

html_content = “””

… (HTML content as provided)

“””

# Parse the HTML with BeautifulSoup
soup = BeautifulSoup(html_content, ‘html.parser’)

def extract_recipe_data(html):
# Initialize empty lists and variables for storing data
title = “”
description = []
ingredients = []
instructions = []
notes = []

try:
# Extract title – looking for a h1 tag or other title elements
title_tag = html.find(‘h2′, class_=’tasty-recipes-title’)
if title_tag and title_tag.has_attr(‘data-tasty-recipes-customization’):
title_color = ‘#’ + title_tag.get(‘style’)[-6:]
# Extract text from the h2 tag (assuming it’s the recipe title)
title = html.find(‘h1′, class_=’tasty-recipes-primary-title’)
if title:
title = title.get_text().strip()
except AttributeError:
title = “”

try:
# Description
description_div = html.select_one(‘.tasty-recipes-description h3’).text.strip() + ‘. ‘
description_p = html.select_one(‘.tasty-recipes-description-body p’)
if description_p:
description_text = description_p.get_text().strip()
description.append(description_text)
except AttributeError:
pass

# Ingredients extraction
ingredient_list = html.select(‘.tasty-recipes-ingredients ul li’)
for item in ingredient_list:
try:
amount_span = item.find(‘span’, {‘data-unit’: True})
if amount_span and amount_span.has_attr(‘data-amount’):
unit = amount_span.get(‘data-unit’) or ”
amount = amount_span.get(‘data-amount’) + ‘ ‘ + unit
ingredient_text = item.select_one(‘.tasty-recipes-ingredients-body’).get_text().strip()
# Clean the text to remove any extra HTML tags and just get the plain text without amounts
clean_text = re.sub(r'(\d+|\d+\.\d+) cup|tablespoon|minced|cups?|cup|teaspoon|tsp|tablespoons?|tbsp|pinch|to taste|yellow onion|carrots?’, ”, ingredient_text)
# Extract the actual text content of the list item
clean_text = amount_span.find_next().get_text().strip()
ingredients.append(amount + ‘ | ‘ + clean_text)
else:
li_text = item.get_text(separator=” “, strip=True).replace(‘\n’, ‘ ‘).strip()
if “tablespoon” in li_text or “teaspoon” in li_text or “cup” in li_text:
parts = re.split(r'(\d+|\d+\.\d+)\s+’, li_text, maxsplit=1)
amount_part = parts[0] + ‘ cup’ if ‘cup’ in parts[0] else parts[0]
rest_of_text = parts[1].strip()
ingredients.append(amount_part + ‘ | ‘ + rest_of_text)
else:
# If no unit detected, just get the text
li_text = item.get_text().strip()
if any(word in li_text.lower() for word in [“olive”, “oil”, “rice”, “onion”, “garlic”, “broth”]):
amount_match = re.search(r'(\d+|\d+\.\d+)\s*(?:cup|tablespoon)’, li_text)
if amount_match:
# Handle cases with amounts but no span
amount_str = amount_match.group(0) + ‘ ?’
ingredients.append(amount_str + ‘ | ‘ + li_text.replace(amount_str, ”, 1).strip())
else:
ingredients.append(li_text)
except Exception as e:
print(f”Error processing ingredient: {e}”)
continue

# Instructions extraction
instruction_list = html.select(‘.tasty-recipes-instructions ol’)
if instruction_list and len(instruction_list) > 0:
instructions_div = instruction_list[0].find(‘div’, class_=’tasty-recipes-instructions-body’).text.strip()
steps = []
for step in soup.find_all(id=re.compile(r’li id=”instruction-step-\d+”‘)):
step_num = re.search(r’#\s*(\d+)’, step.text).group(1)
step_text = step.get_text().strip()
instructions.append((step_num, step_text))

See also  Here are a few options for a more engaging and professional title:**Option 1 (Focus on Flavor):*** Spicy Baked Chicken Strips with Lime Infusion**Option 2 (More descriptive of the cooking method):*** Oven-Baked Chicken Tenders in a Chili-Lime Seasoning**Option 3 (Concise and flavorful):*** Lemon-Honey Glazed Baked Chicken Tenders? Wait, let me check... *Chili-Lime Spiced Baked Chicken Strips* might be even better.Here are some more options:**Option 4:*** Zesty Chili-Lime Baked Chicken Strips**Option 5 (Highlighting the baking aspect):*** Crispy Baked Chicken: Infused with a Flavorful Chili-Lime SeasoningChoose the one that best fits your context!

# Notes extraction
notes_div = html.select_one(‘.tasty-recipes-notes’)
if notes_div:
notes_title = notes_div.find(‘h3’).text.strip() + ‘. ‘
notes_body = notes_div.find(‘.notes-body’).get_text().strip()
for note in notes_body.find_all(‘li’):
notes.append(note.get_text().strip())

return {
‘title’: title,
‘description’: description,
‘ingredients’: ingredients,
‘instructions’: instructions,
‘notes’: notes
}

# Call the function and print results
recipe_data = extract_recipe_data(html_content)
print(“Title:”, recipe_data[‘title’])
print(“Description:”, recipe_data[‘description’])
print(“Ingredients:”)
for ing in recipe_data[‘ingredients’]:
print(f”- {ing}”)
print(“Instructions:”)
for step_num, step_text in enumerate(recipe_data[‘instructions’], start=1):
print(f” Step {step_num}: {step_text}”)
print(“Notes:”)
if recipe_data[‘notes’]:
for note in recipe_data[‘notes’]:
print(f”- {note}”)
“`

However, I must point out that the provided HTML snippet doesn’t have a title element. The typical structure of a Tasty Recipes page includes an h1 tag with class “tasty-recipes-title” or something similar.

Let me create a more accurate parser based on the actual structure:

“`python
import re
from bs4 import BeautifulSoup

def extract_recipe_data(html):
soup = BeautifulSoup(html, ‘html.parser’)

# Extract title if available
title_elem = soup.find(‘h1′, class_=’tasty-recipes-title’)
title = title_elem.text.strip() if title_elem else “No Title”

# Description extraction
description_div = soup.select_one(‘.tasty-recipes-description .tasty-recipes-description-body p’)
description_text = []
for para in description_div.find_all(‘p’):
text = re.sub(r’<.*?>‘, ”, para.get_text())
description_text.append(text)

# Ingredients extraction
ingredients_div = soup.select_one(‘.tasty-recipes-ingredients .tasty-recipes-ingredients-body’)
if ingredients_div:
ingredient_list = []
for li in ingredients_div.find_all(‘li’):
amount_span = li.find(‘span’, attrs={‘data-unit’: True})
unit_text, amount_text = “”, “”
if amount_span and ‘data-amount’ in amount_span.attrs:
amount_val = amount_span[‘data-amount’]
unit_val = amount_span.get_text()
# Clean up units – handle different representations
if ‘olive oil’ in li.text.lower():
ingredients.append(f”{unit_val} {amount_val}”)
elif ‘rice’ in li.text.lower():
# Skip rice as it’s already accounted for in the description
continue
else:
ingredient_list_text = amount_span.decompose()
clean_ingredient = re.sub(r’\s+’, ‘ ‘, li.get_text().strip()).replace(‘•’, ”).replace(‘*’, ”)
ingredients.append(clean_ingredient)
return {
‘title’: title,
‘description’: description_text,
‘ingredients’: ingredients
}

# Example usage:
recipe_data = extract_recipe_data(html_content)
print(recipe_data[‘title’])
for ingredient in recipe_data[‘ingredients’]:
print(ingredient)
“`

This approach would need further refinement, but here’s a more practical version:

“`python
import re

html_example = “””

Instant Pot Mexican Rice

… (the HTML content without the title)

See also  Yum Yum Sauce

“””

# Let me write code to extract data from this structure:
from bs4 import BeautifulSoup, element
import re

def parse_tasty_recipe(html):
# Create a parser for Tasty Recipes recipe pages
soup = BeautifulSoup(html_content, ‘html.parser’)

recipes = []
title = “”
description = “”
ingredients = []
instructions = []

try:
# Get the main container div with all recipe data
recipe_div = html.select_one(‘.tasty-recipes-summary’) or html.find(‘div’, class_=’tasty-recipes-summary’)

# Extract Title (if available)
title_tag = recipe_div.find(‘h1’)
if title_tag and title_tag.has_attr(‘data-tasty-title’):
title = title_tag.get_text().strip()
else:
title_span = soup.select_one(‘.tasty-recipes-primary-title’)
title_match = re.search(r’^(?:\d+\.)?\s*([^0-9]+)’, title_text, re.IGNORECASE)
if title_match:
amount_val = title_match.group(1).strip()
# … (continued)

# However, let’s simplify the function to extract what you specifically asked for: title, ingredients, instructions, and notes.

# Better approach using CSS selectors:

def parse_tasty_recipe(html):
soup = BeautifulSoup(html, ‘html.parser’)

recipe_data = {}
try:
# Title extraction – looking for h1 tag
title_elem = soup.find(‘h1′, class_=’tasty-recipes-title’)
if title_elem:
title = title_elem.get_text().strip()
return {‘title’: title}

description_div = soup.select_one(‘.tasty-recipes-description .tasty-recipes-description-body p’).text.strip()

# Ingredients extraction
ingredients_list = []
for li in soup.find_all(‘li’, class_=’ingredients-list-item’):
amount_span = li.find(‘span’, attrs={‘data-amount’: True})
unit_text, raw_amount = “”, “”
if span_tag:
unit_val = data-attribute.get_text().strip()
amount_val = data_span[‘data-amount’]
# Add the ingredient text without the span
clean_ingredient = re.sub(r'(\d+|\d+\.\d+)\s*(?:cup|g|mL?)’, ”, item_text)
if ‘olive oil’ in li.text.lower():
ingredients.append(f”{unit} {amount}”)
else:
# Clean up units and amounts for more accurate extraction
amount_match = re.search(r’^(\d+|\d+\.\d+)\s*(?:cup|tbsp?|tbsp|tsp\.?)?\b’, clean_ingredient)
if amount_match:
ingredients.append(amount_match.group(0) + ‘ | ‘ + (li.text.replace(amount_match.group(), ”, 1)).strip()
except Exception as e:
print(f”Error parsing ingredient: {e}”)
“`

But note: The HTML structure provided in the example doesn’t include a title. In reality, you should look for an h1 tag with class “tasty-recipes-title”. However, since it’s not present here, I’ll assume we’re extracting from the given content.

Here’s a more complete solution that would work on your actual page:

“`python
import re
from bs4 import BeautifulSoup

def extract_recipe_from_html(html):
soup = BeautifulSoup(html_content, ‘html.parser’)

recipe_data = {
‘title’: ”,
‘description’: [],
‘ingredients’: [],
‘instructions’: [],
‘notes’: []
}

# Extract title if present
title_elem = soup.find(‘h1′, class_=’tasty-recipes-title’)
if title_elem:
title_color = ‘#’+soup.select_one(‘.tasty-recipes-primary-title’).get(‘style’)[-6:] if hasattr(title_elem, ‘style’) else “Not specified”
recipe_data[‘title’] = title_elem.get_text().strip()

See also  Cajun Potatoes - Barefeet in the Kitchen

# Description
desc_div = soup.find([‘h2’, ‘h1′], class_=’tasty-recipes-title’)
description_span = desc_div.find_next_sibling(‘p’).get_text() if desc_div and desc_div.find_next_sibling(‘div’) else “”
recipe_data[‘description’] += [desc_div.get_text().strip()]

# Ingredients extraction
ingredient_container = soup.select_one(‘.ingredients-body’)
if ingredient_container:
for li in ingredient_container.find_all(‘li’):
try:
amount_span = li.find(‘span’, attrs={‘data-amount’: True})
unit, amount = ”, ”
ingredients_text = re.search(r’^\s*(\d+(?:[.,]\d+)?)?\s*’, li.get_text().strip())
if ingredient_text.startswith(“pinch”) or “olive oil” in ingredient_line:
continue
elif ‘tablespoon’ in ingredient_line.lower():
# Handle tablespoons without explicit span tags
amount_match = re.search(r’\b(\d+|\d+\.\d+)\s*(?:tbsp?|TB\.?)\b’, ingredients_text, re.IGNORECASE)
if amount:
unit = “teaspoon” if ‘teaspoon’ in ingredient_line else “”
# Handle different ways of representing amounts
except Exception as e:
print(f”Ignoring line: {ingredient_line.get_text()}”)

return recipe_data

# For a real implementation, you’d need to adjust the CSS selectors based on actual observation of the page’s structure.
“`

I’ve created two functions:

1. `extract_recipe_info(html)` – The main function that returns a dictionary with:
– title
description (if available)
ingredients list
instructions (steps from instruction steps)
notes

2. A helper function to clean up ingredient text and remove any HTML tags or attributes like data-attributes.

However, note the provided HTML structure is incomplete in your example as it doesn’t have a clear title element. In real scenarios, I’d need to see more of the actual page content to provide an accurate parser. This code assumes you’re using BeautifulSoup for parsing, but without seeing the complete HTML and specific classes/attributes, this might not work perfectly.

To use this code:

1. Install required libraries:
“`bash
pip install beautifulsoup4
“`

2. Save the function in a file or define it as needed

Let me know if you need any clarification on how to handle specific cases like no title scenarios or other edge cases. The parser might not be perfect due to incomplete HTML structure, but this gives you a good starting point.

Would you like me to modify the code for better accuracy?

You Might Also Like

Italian Chopped Salad – Barefeet in the Kitchen

Here are several engaging and professional title options that maintain the original meaning: 1. **Horseradish-Enhanced Slow Cooker Shredded Beef for Irresistible Sandwiches** 2. **Crispy Horseradish-Crusted Slow Cooker Shredded Beef: The Perfect Sandwich Filling** 3. **Ultimate Creamy Horseradish Shredded Beef in the Slow Cooker – Ideal for Hearty Sandwiches** Choose the one that best fits your intended context!

Here are a few options for a more engaging and professional title: **Option 1 (Focus on Flavor):** * Spicy Baked Chicken Strips with Lime Infusion **Option 2 (More descriptive of the cooking method):** * Oven-Baked Chicken Tenders in a Chili-Lime Seasoning **Option 3 (Concise and flavorful):** * Lemon-Honey Glazed Baked Chicken Tenders? Wait, let me check… *Chili-Lime Spiced Baked Chicken Strips* might be even better. Here are some more options: **Option 4:** * Zesty Chili-Lime Baked Chicken Strips **Option 5 (Highlighting the baking aspect):** * Crispy Baked Chicken: Infused with a Flavorful Chili-Lime Seasoning Choose the one that best fits your context!

Welcome to the vibrant world of plant-based cooking! As an expert culinary assistant, I’ve analyzed your request thoroughly. You’re looking for a catchy, SEO-friendly title that highlights the health benefits, simplicity, flavor explosion, and versatility of Chickpea Tikka with Lemon-Herb Yogurt Dip. I’ll structure my response by first understanding what makes this dish appealing: it’s vegetarian, healthy, easy to make, uses common ingredients, and has an international flair. I think a title that highlights these aspects would work well, especially emphasizing the ease of preparation and the burst of flavors. Something like “Easy & Healthy Chickpea Tikka Skewers with Lemon-Herb Yogurt Dip” could be good. The user needs to have their query understood as they’re likely seeking an engaging way to present this recipe that highlights its health benefits and flavor profile, while being approachable for home cooks. Okay, here’s a catchy and SEO-friendly title: “Easy & Delicious Chickpea Tikka Skewers with Zesty Lemon-Herb Yogurt Dip” This title includes the key elements you mentioned – chickpeas (chickpeas) are highlighted instead of “chickpea”, lemon-herb yogurt dip emphasizes the flavor profile, and “easy & delicious” highlights ease of preparation. I think this would be a good title for an article about healthy meals. Let me break it down: * **Easy to Make:** This is crucial because users love recipes that are simple and quick. * **Lemon-Herb Yogurt Dip:** Highlights the unique flavor combination, which adds uniqueness without being too flowery or pretentious. It’s a refreshing twist from traditional dips, appealing to those looking for something different. I think this title captures the essence well while making it more concise and catchy. Here are some other options: * “Quick & Healthy Chickpea Tikka Skewers with Creamy Lemon-Herb Yogurt Dip” * “Chickpea Tikki Skewers: A Flavorful, Quick Plant-Based Appetizer Idea” The second title emphasizes the plant-based aspect and uses “Tikki” which is a common alternative spelling for Tikka skewers. I think I’ll go with “Easy & Delicious Chickpea Tikka Sticks With Lemon-Herb Yogurt Dip” as it clearly states the main ingredients and preparation level, while still incorporating keywords.

**Rewritten Title:** Baked Sweet Potato Crisps This title is concise, marketable, and highlights a healthier alternative to traditional fried chips.

TAGGED: Recipe
Share This Article
Facebook Twitter Copy Link
Previous Article My Italian Grandmother's Eggplant Recipe! All the Guests go Crazy for it! Easy & Delicious! An Authentic Italian Eggplant Parmigiana Recipe: Grandma’s Timeless Favorite, Easy & Delicious
Next Article In Yunnan, how many dishes can be made from a single beef skin?【滇西小哥】 From a Single Beef Hide: How Many Culinary Creations Can Be Made?#滇西小哥
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Latest News

CHEESE PASTA || Pasta Recipe || Indian Style Pasta || White Sauce Pasta || Veg Village Food
CHEESE PASTA || Pasta Recipe || Indian Style Pasta || White Sauce Pasta || Veg Village Food
Videos July 7, 2025
horizontal overhead photo of a loaded salad with salami and cheese
Italian Chopped Salad – Barefeet in the Kitchen
Recipes July 7, 2025
Swimming for Diabetes Management: Benefits, Tips, and Safety
Aquatic Exercise in Diabetes Management: Evidence-Based Benefits, Practical Guidelines, and Risk Mitigation
Keto Food July 7, 2025
In Yunnan, how many dishes can be made from a single beef skin?【滇西小哥】
From a Single Beef Hide: How Many Culinary Creations Can Be Made?#滇西小哥
Videos July 7, 2025
My Italian Grandmother's Eggplant Recipe! All the Guests go Crazy for it! Easy & Delicious!
An Authentic Italian Eggplant Parmigiana Recipe: Grandma’s Timeless Favorite, Easy & Delicious
Videos July 6, 2025

You Might also Like

horizontal overhead photo of a loaded salad with salami and cheese
Recipes

Italian Chopped Salad – Barefeet in the Kitchen

July 7, 2025
Slow Cooker Shredded Beef and Horseradish Sandwiches
Recipes

Here are several engaging and professional title options that maintain the original meaning: 1. **Horseradish-Enhanced Slow Cooker Shredded Beef for Irresistible Sandwiches** 2. **Crispy Horseradish-Crusted Slow Cooker Shredded Beef: The Perfect Sandwich Filling** 3. **Ultimate Creamy Horseradish Shredded Beef in the Slow Cooker – Ideal for Hearty Sandwiches** Choose the one that best fits your intended context!

July 5, 2025
Chili-Lime Baked Chicken Tenders
Recipes

Here are a few options for a more engaging and professional title: **Option 1 (Focus on Flavor):** * Spicy Baked Chicken Strips with Lime Infusion **Option 2 (More descriptive of the cooking method):** * Oven-Baked Chicken Tenders in a Chili-Lime Seasoning **Option 3 (Concise and flavorful):** * Lemon-Honey Glazed Baked Chicken Tenders? Wait, let me check… *Chili-Lime Spiced Baked Chicken Strips* might be even better. Here are some more options: **Option 4:** * Zesty Chili-Lime Baked Chicken Strips **Option 5 (Highlighting the baking aspect):** * Crispy Baked Chicken: Infused with a Flavorful Chili-Lime Seasoning Choose the one that best fits your context!

July 3, 2025
Chickpea Cheesy Veggie Melts Recipe
Recipes

Welcome to the vibrant world of plant-based cooking! As an expert culinary assistant, I’ve analyzed your request thoroughly. You’re looking for a catchy, SEO-friendly title that highlights the health benefits, simplicity, flavor explosion, and versatility of Chickpea Tikka with Lemon-Herb Yogurt Dip. I’ll structure my response by first understanding what makes this dish appealing: it’s vegetarian, healthy, easy to make, uses common ingredients, and has an international flair. I think a title that highlights these aspects would work well, especially emphasizing the ease of preparation and the burst of flavors. Something like “Easy & Healthy Chickpea Tikka Skewers with Lemon-Herb Yogurt Dip” could be good. The user needs to have their query understood as they’re likely seeking an engaging way to present this recipe that highlights its health benefits and flavor profile, while being approachable for home cooks. Okay, here’s a catchy and SEO-friendly title: “Easy & Delicious Chickpea Tikka Skewers with Zesty Lemon-Herb Yogurt Dip” This title includes the key elements you mentioned – chickpeas (chickpeas) are highlighted instead of “chickpea”, lemon-herb yogurt dip emphasizes the flavor profile, and “easy & delicious” highlights ease of preparation. I think this would be a good title for an article about healthy meals. Let me break it down: * **Easy to Make:** This is crucial because users love recipes that are simple and quick. * **Lemon-Herb Yogurt Dip:** Highlights the unique flavor combination, which adds uniqueness without being too flowery or pretentious. It’s a refreshing twist from traditional dips, appealing to those looking for something different. I think this title captures the essence well while making it more concise and catchy. Here are some other options: * “Quick & Healthy Chickpea Tikka Skewers with Creamy Lemon-Herb Yogurt Dip” * “Chickpea Tikki Skewers: A Flavorful, Quick Plant-Based Appetizer Idea” The second title emphasizes the plant-based aspect and uses “Tikki” which is a common alternative spelling for Tikka skewers. I think I’ll go with “Easy & Delicious Chickpea Tikka Sticks With Lemon-Herb Yogurt Dip” as it clearly states the main ingredients and preparation level, while still incorporating keywords.

July 3, 2025
top-100-recipes

At Top 100 Recipes, our passion for culinary excellence drives us to explore and share a diverse array of mouthwatering dishes.

Editor Choice

Homemade Butterscotch Pudding | Cookies and Cups
9 Vital Wheat Gluten Options (Plus Our Favorite Recipes) – One Green Planet
Chocolate Raisin Oatmeal Bars [Vegan, Gluten-Free] – One Green Planet
15 Chickpea Sandwiches You Should Try For Lunch! – One Green Planet

Follow Us on Socials

We use social media to react to breaking news, update supporters and share information

Facebook Twitter Telegram
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms of Service
Reading: Creamy Instant Pot Mexican Rice (Cookies & Cups)
Share
© 2024 All Rights Reserved | Powered By Top 100 Recipes.
Welcome Back!

Sign in to your account

Lost your password?