How to generate a dynamic html as string error f-string: expressions nested too deeply

I am requesting the html content of file by html_text = requests.get('').text

after getting this i want to extract the title price and a lot of different things and then fill my html template with the data and save it as text in csv file

    <title>Free Health Faucet On Jaquar Water Closet KUS-WHT-35951
    <script type="application/ld+json">
      "@context": "",
      "@type": "Product",
      "name": "Health Faucet On Jaquar Water Closet",
      "image": [
      "description": "Get Jaquar Health Faucet Free (Worth Rs.999) On purchase of Jaquar Water Closet KUS-WHT-35951 and get 25% discount Product SKU : KUS-WHT-35951FREEALD-CHR-583 Closet Details: Product Code: KUS-WHT-35951 MRP: 15990 Closet Size: 385*595*385 Brand : Jaquar Closet Series: Kubix Type of Trap: P-Trap Type of Mounting",
      "sku": "0446310786",
      "mpn": "925872",
      "brand": {
        "@type": "Brand",
        "name": "Jaquar"
      "review": {
        "@type": "Review",
        "reviewRating": {
          "@type": "Rating",
          "ratingValue": "4",
          "bestRating": "5"
        "author": {
          "@type": "Person",
          "name": "BuildPro"
      "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.9",
        "reviewCount": "989"
      "offers": {
        "@type": "Offer",
        "url": "",
        "priceCurrency": "INR",
        "price": "1,119.99",
        "priceValidUntil": "2020-11-20",
        "itemCondition": "",
        "availability": ""

The problem i face is that it have that i cant declare string by using docuble quates and neither by triple and double quotes from this answer How do I create a multiline Python string with inline variables? i learn how can i put variables in a multiline string but when i try to put variable it gives error that more string requires i guess that there are more ways to insert variable other than %s that means that also not work i think we can generate dynamic html with the help of django but if i find a way to save it as string instead of rendering as template

Back to Top