{"id":2657,"date":"2026-08-28T21:38:44","date_gmt":"2026-08-28T21:38:44","guid":{"rendered":"https:\/\/www.cupcakerecipe.net\/?p=2657"},"modified":"2026-08-28T21:38:44","modified_gmt":"2026-08-28T21:38:44","slug":"by-peter-manifis","status":"publish","type":"post","link":"https:\/\/www.cupcakerecipe.net\/?p=2657","title":{"rendered":"By: Peter Manifis"},"content":{"rendered":"<p>This web site inspires me!! The recipes are all tried and tested there is rarely a mistake!! Thank you for all your years on hard work and dedication! I am a trained chef cooking for 35years and you are still at the top of your game guys!!<\/p>\n<p> version ai :<\/p>\n<p>python<br \/>\nimport requests<br \/>\nfrom bs4 import BeautifulSoup<br \/>\nfrom urllib.parse import urljoin<\/p>\n<p>def get_full_article_html(url):<\/p>\n<h1>Remove the fragment identifier (e.g., #comment-2743284) from the URL<\/h1>\n<pre><code>base_url = url.split('#')[0]\n\ntry:\n    # User-Agent header to mimic a browser, sometimes helps with access\n    headers = {\n        'User-Agent': 'Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/91.0.4472.124 Safari\/537.36'\n    }\n    response = requests.get(base_url, headers=headers)\n    response.raise_for_status()  # Raise an HTTPError for bad responses (4xx or 5xx)\nexcept requests.exceptions.RequestException:\n    # If there's an error fetching the page, return an empty string\n    # as per \"return final article with out any explain information\".\n    return \"\"\n\nsoup = BeautifulSoup(response.text, 'html.parser')\n\n# Find the main article content div\n# On Smitten Kitchen, this is typically `div.entry-content`\narticle_content_div = soup.find('div', class_='entry-content')\n\nif not article_content_div:\n    # If the content div is not found, return an empty string.\n    return \"\"\n\n# Process images to ensure absolute URLs and handle lazy loading attributes\nfor img_tag in article_content_div.find_all('img'):\n    # Handle lazy-loaded src\n    if 'data-lazy-src' in img_tag.attrs:\n        img_tag['src'] = urljoin(base_url, img_tag['data-lazy-src'])\n        del img_tag['data-lazy-src']\n    elif 'src' in img_tag.attrs: # Ensure src is absolute if not lazy-loaded\n        img_tag['src'] = urljoin(base_url, img_tag['src'])\n    else:\n        # If no src or data-lazy-src, remove the img tag as it's likely broken or a placeholder.\n        img_tag.decompose()\n        continue # Move to the next image\n\n    # Handle lazy-loaded srcset\n    if 'data-lazy-srcset' in img_tag.attrs:\n        srcset_values = img_tag['data-lazy-srcset'].split(',')\n        processed_srcset_values = []\n        for entry in srcset_values:\n            parts = entry.strip().rsplit(' ', 1) # Split into URL and descriptor (e.g., '1024w')\n            if len(parts) == 2:\n                processed_srcset_values.append(f\"{urljoin(base_url, parts[0])} {parts[1]}\")\n            else: # Only URL without descriptor\n                processed_srcset_values.append(urljoin(base_url, parts[0]))\n        img_tag['srcset'] = ', '.join(processed_srcset_values)\n        del img_tag['data-lazy-srcset']\n    elif 'srcset' in img_tag.attrs: # If there's a srcset but no data-lazy-srcset\n        srcset_values = img_tag['srcset'].split(',')\n        processed_srcset_values = []\n        for entry in srcset_values:\n            parts = entry.strip().rsplit(' ', 1)\n            if len(parts) == 2:\n                processed_srcset_values.append(f\"{urljoin(base_url, parts[0])} {parts[1]}\")\n            else:\n                processed_srcset_values.append(urljoin(base_url, parts[0]))\n        img_tag['srcset'] = ', '.join(processed_srcset_values)\n\n    # Remove other lazy-loading attributes\n    if 'data-lazy-sizes' in img_tag.attrs:\n        del img_tag['data-lazy-sizes']\n    if 'loading' in img_tag.attrs and img_tag['loading'] == 'lazy':\n        del img_tag['loading'] # No need for lazy loading if we want the image to load immediately\n\n# Return the full HTML content of the article_content_div including its tags.\nreturn str(article_content_div)<\/code><\/pre>\n<h1>The URL provided points to a comment. The actual article URL is the base part.<\/h1>\n<p>article_url = &#8220;<a href=\"https:\/\/smittenkitchen.com\/2025\/04\/simplest-brisket-with-braised-onions\/#comment-2743284\">https:\/\/smittenkitchen.com\/2025\/04\/simplest-brisket-with-braised-onions\/#comment-2743284<\/a>&#8221;<br \/>\nfinal_article_html = get_full_article_html(article_url)<br \/>\nprint(final_article_html)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This web site inspires me!! The recipes are all tried and tested there is rarely a mistake!! Thank you for all your years on hard work and dedication! I am a trained chef cooking for 35years and you are still at the top of your game guys!! version ai : python import requests from bs4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","iawp_total_views":0,"footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-2657","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-uncategorized"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.6 (Yoast SEO v26.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>By: Peter Manifis - cupcake recipe<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"By: Peter Manifis\" \/>\n<meta property=\"og:description\" content=\"This web site inspires me!! The recipes are all tried and tested there is rarely a mistake!! Thank you for all your years on hard work and dedication! I am a trained chef cooking for 35years and you are still at the top of your game guys!! version ai : python import requests from bs4 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cupcakerecipe.net\/?p=2657\" \/>\n<meta property=\"og:site_name\" content=\"cupcake recipe\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-28T21:38:44+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.cupcakerecipe.net\/?p=2657#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.cupcakerecipe.net\/?p=2657\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/www.cupcakerecipe.net\/#\/schema\/person\/eeb0f97aec73d7100df65b40b182044d\"},\"headline\":\"By: Peter Manifis\",\"datePublished\":\"2026-08-28T21:38:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.cupcakerecipe.net\/?p=2657\"},\"wordCount\":115,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.cupcakerecipe.net\/?p=2657#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cupcakerecipe.net\/?p=2657\",\"url\":\"https:\/\/www.cupcakerecipe.net\/?p=2657\",\"name\":\"By: Peter Manifis - cupcake recipe\",\"isPartOf\":{\"@id\":\"https:\/\/www.cupcakerecipe.net\/#website\"},\"datePublished\":\"2026-08-28T21:38:44+00:00\",\"author\":{\"@id\":\"https:\/\/www.cupcakerecipe.net\/#\/schema\/person\/eeb0f97aec73d7100df65b40b182044d\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.cupcakerecipe.net\/?p=2657#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cupcakerecipe.net\/?p=2657\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.cupcakerecipe.net\/?p=2657#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.cupcakerecipe.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"By: Peter Manifis\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cupcakerecipe.net\/#website\",\"url\":\"https:\/\/www.cupcakerecipe.net\/\",\"name\":\"cupcake recipe\",\"description\":\"Baking and dessert recipes for cupcakes, cakes, muffins, pies, and everything in between - from perfected classics to new and adventurous indulgences.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.cupcakerecipe.net\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.cupcakerecipe.net\/#\/schema\/person\/eeb0f97aec73d7100df65b40b182044d\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.cupcakerecipe.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fa5a40e10f358e78b5b5a39b5fecc35f4c68f82c33a6fe8a71482b6be3838c69?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fa5a40e10f358e78b5b5a39b5fecc35f4c68f82c33a6fe8a71482b6be3838c69?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/cupcakerecipe.net\"],\"url\":\"https:\/\/www.cupcakerecipe.net\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"By: Peter Manifis - cupcake recipe","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"By: Peter Manifis","og_description":"This web site inspires me!! The recipes are all tried and tested there is rarely a mistake!! Thank you for all your years on hard work and dedication! I am a trained chef cooking for 35years and you are still at the top of your game guys!! version ai : python import requests from bs4 [&hellip;]","og_url":"https:\/\/www.cupcakerecipe.net\/?p=2657","og_site_name":"cupcake recipe","article_published_time":"2026-08-28T21:38:44+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cupcakerecipe.net\/?p=2657#article","isPartOf":{"@id":"https:\/\/www.cupcakerecipe.net\/?p=2657"},"author":{"name":"admin","@id":"https:\/\/www.cupcakerecipe.net\/#\/schema\/person\/eeb0f97aec73d7100df65b40b182044d"},"headline":"By: Peter Manifis","datePublished":"2026-08-28T21:38:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cupcakerecipe.net\/?p=2657"},"wordCount":115,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cupcakerecipe.net\/?p=2657#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.cupcakerecipe.net\/?p=2657","url":"https:\/\/www.cupcakerecipe.net\/?p=2657","name":"By: Peter Manifis - cupcake recipe","isPartOf":{"@id":"https:\/\/www.cupcakerecipe.net\/#website"},"datePublished":"2026-08-28T21:38:44+00:00","author":{"@id":"https:\/\/www.cupcakerecipe.net\/#\/schema\/person\/eeb0f97aec73d7100df65b40b182044d"},"breadcrumb":{"@id":"https:\/\/www.cupcakerecipe.net\/?p=2657#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cupcakerecipe.net\/?p=2657"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.cupcakerecipe.net\/?p=2657#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cupcakerecipe.net\/"},{"@type":"ListItem","position":2,"name":"By: Peter Manifis"}]},{"@type":"WebSite","@id":"https:\/\/www.cupcakerecipe.net\/#website","url":"https:\/\/www.cupcakerecipe.net\/","name":"cupcake recipe","description":"Baking and dessert recipes for cupcakes, cakes, muffins, pies, and everything in between - from perfected classics to new and adventurous indulgences.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cupcakerecipe.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.cupcakerecipe.net\/#\/schema\/person\/eeb0f97aec73d7100df65b40b182044d","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cupcakerecipe.net\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fa5a40e10f358e78b5b5a39b5fecc35f4c68f82c33a6fe8a71482b6be3838c69?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fa5a40e10f358e78b5b5a39b5fecc35f4c68f82c33a6fe8a71482b6be3838c69?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/cupcakerecipe.net"],"url":"https:\/\/www.cupcakerecipe.net\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/www.cupcakerecipe.net\/index.php?rest_route=\/wp\/v2\/posts\/2657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cupcakerecipe.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cupcakerecipe.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cupcakerecipe.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cupcakerecipe.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2657"}],"version-history":[{"count":0,"href":"https:\/\/www.cupcakerecipe.net\/index.php?rest_route=\/wp\/v2\/posts\/2657\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cupcakerecipe.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cupcakerecipe.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cupcakerecipe.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}