Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,20 +114,20 @@ def generate_blogger_html(app_query, custom_link, mirror_1, mirror_2, mod_featur
|
|
| 114 |
|
| 115 |
related_html = f'<div style="border: 1px dashed {theme_color}; padding: 25px; border-radius: 16px; text-align: center; margin-bottom: 35px;"><h3 style="margin-top:0; color:#fff;">Looking for more?</h3><a href="{related_link.strip()}" style="color: {theme_color}; font-weight: 800; font-size: 1.1rem; text-decoration: none;">Download {related_name.strip()} Mod APK <i class="fa-solid fa-arrow-right"></i></a></div>' if related_name and related_link else ""
|
| 116 |
|
| 117 |
-
req_app_html = f'<h2 style="border-left: 5px solid #ef4444; padding-left: 12px; margin-bottom: 20px; font-size: 1.4rem;">Requirements</h2><div style="background: rgba(239, 68, 68, 0.05); border: 1px solid rgba(239, 68, 68, 0.2); padding: 20px; border-radius: 16px; display: flex; align-items: center; gap: 15px; margin-bottom: 35px;"><div style="width: 50px; height: 50px; background: rgba(239, 68, 68, 0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #ef4444; font-size: 1.5rem;"><i class="fa-solid fa-puzzle-piece"></i></div><div style="flex: 1;"><h3 style="margin: 0 0 5px 0; font-size: 1.1rem;">{req_name}</h3><p style="margin: 0; font-size: 0.85rem; color: #94a3b8;">Companion app required.</p></div><a href="{req_link}" target="_blank" style="background: #ef4444; color: #fff; padding: 10px 20px; border-radius: 50px; text-decoration: none; font-weight: 700;">
|
| 118 |
|
| 119 |
tutorial_btn = f'<a href="{tutorial_link.strip()}" target="_blank" style="color: #a855f7; text-decoration: none; transition: 0.2s;"><i class="fa-solid fa-book-open"></i> View Tutorial</a>' if tutorial_link else ""
|
| 120 |
|
| 121 |
# Media Blocks
|
| 122 |
-
screenshots_html = f'<h2 style="border-left: 5px solid {theme_color}; padding-left: 12px; margin-top: 35px; font-size: 1.4rem;">App Screenshots</h2><div style="display: flex; gap: 15px; overflow-x: auto; padding-bottom: 15px; scroll-snap-type: x mandatory; margin-bottom: 35px;">' + "".join([f'<img src="{s}" style="height: 300px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); scroll-snap-align: start;">' for s in screenshots]) + '</div>' if screenshots else ""
|
| 123 |
-
video_html = f'<h2 style="border-left: 5px solid {theme_color}; padding-left: 12px; margin-top: 35px; font-size: 1.4rem;">Trailer</h2><div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 16px; margin-bottom: 35px;"><iframe src="{video_url.replace("watch?v=", "embed/")}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" frameborder="0" allowfullscreen></iframe></div>' if video_url else ""
|
| 124 |
|
| 125 |
root_color = "#10b981" if "No" in root_req else "#ef4444"
|
| 126 |
|
| 127 |
|
| 128 |
# Schemas
|
| 129 |
schema_app = {"@context": "https://schema.org", "@type": "SoftwareApplication", "name": title, "operatingSystem": "ANDROID", "applicationCategory": category, "image": icon_url, "author": { "@type": "Organization", "name": developer }, "aggregateRating": {"@type": "AggregateRating", "ratingValue": str(rating), "ratingCount": str(reviews_count)}, "offers": { "@type": "Offer", "price": "0.00", "priceCurrency": "USD" }}
|
| 130 |
-
schema_faq = {"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{"@type": "Question", "name": f"Is {title} Mod safe?", "acceptedAnswer": {"@type": "Answer", "text": "Yes, verified by Lexical Space."}}]}
|
| 131 |
schema_sysreq = {"@context": "https://schema.org", "@type": "SoftwareApplication", "name": title, "operatingSystem": "ANDROID", "applicationCategory": category, "author": { "@type": "Organization", "name": developer }, "requirements": { "@type": "SoftwareApplicationRequirements", "name": "Minimum System Requirements", "operatingSystem": "Android 9.0 (Pie)+", "ram": "4 GB+", "storage": "100 MB+" }}
|
| 132 |
schema_script = f'<script type="application/ld+json">\n[{json.dumps(schema_app)}, {json.dumps(schema_faq)}, {json.dumps(schema_sysreq)}]\n</script>'
|
| 133 |
|
|
|
|
| 114 |
|
| 115 |
related_html = f'<div style="border: 1px dashed {theme_color}; padding: 25px; border-radius: 16px; text-align: center; margin-bottom: 35px;"><h3 style="margin-top:0; color:#fff;">Looking for more?</h3><a href="{related_link.strip()}" style="color: {theme_color}; font-weight: 800; font-size: 1.1rem; text-decoration: none;">Download {related_name.strip()} Mod APK <i class="fa-solid fa-arrow-right"></i></a></div>' if related_name and related_link else ""
|
| 116 |
|
| 117 |
+
req_app_html = f'<h2 style="border-left: 5px solid #ef4444; padding-left: 12px; margin-bottom: 20px; font-size: 1.4rem;">Requirements</h2><div style="background: rgba(239, 68, 68, 0.05); border: 1px solid rgba(239, 68, 68, 0.2); padding: 20px; border-radius: 16px; display: flex; align-items: center; gap: 15px; margin-bottom: 35px;"><div style="width: 50px; height: 50px; background: rgba(239, 68, 68, 0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #ef4444; font-size: 1.5rem;"><i class="fa-solid fa-puzzle-piece"></i></div><div style="flex: 1;"><h3 style="margin: 0 0 5px 0; font-size: 1.1rem;">{req_name}</h3><p style="margin: 0; font-size: 0.85rem; color: #94a3b8;">Companion app required.</p></div><a href="{req_link}" target="_blank" rel="nofollow noopener" style="background: #ef4444; color: #fff; padding: 10px 20px; border-radius: 50px; text-decoration: none; font-weight: 700; font-size: 0.9rem; transition: 0.3s; white-space: nowrap; box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);">Get Companion <i class="fa-solid fa-download" style="margin-left: 5px;"></i></a></div>' if req_name and req_link else ""
|
| 118 |
|
| 119 |
tutorial_btn = f'<a href="{tutorial_link.strip()}" target="_blank" style="color: #a855f7; text-decoration: none; transition: 0.2s;"><i class="fa-solid fa-book-open"></i> View Tutorial</a>' if tutorial_link else ""
|
| 120 |
|
| 121 |
# Media Blocks
|
| 122 |
+
screenshots_html = f'<h2 style="border-left: 5px solid {theme_color}; padding-left: 12px; margin-top: 35px; font-size: 1.4rem;">App Screenshots</h2><div style="display: flex; gap: 15px; overflow-x: auto; padding-bottom: 15px; scroll-snap-type: x mandatory; margin-bottom: 35px;">' + "".join([f'<img src="{s}" style="height: 300px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); scroll-snap-align: start; box-shadow: 0 5px 15px rgba(0,0,0,0.3);">' for s in screenshots]) + '</div>' if screenshots else ""
|
| 123 |
+
video_html = f'<h2 style="border-left: 5px solid {theme_color}; padding-left: 12px; margin-top: 35px; font-size: 1.4rem;">Official Trailer</h2><div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 16px; box-shadow: 0 10px 25px rgba(0,0,0,0.4); margin-bottom: 35px;"><iframe src="{video_url.replace("watch?v=", "embed/")}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" frameborder="0" allowfullscreen></iframe></div>' if video_url else ""
|
| 124 |
|
| 125 |
root_color = "#10b981" if "No" in root_req else "#ef4444"
|
| 126 |
|
| 127 |
|
| 128 |
# Schemas
|
| 129 |
schema_app = {"@context": "https://schema.org", "@type": "SoftwareApplication", "name": title, "operatingSystem": "ANDROID", "applicationCategory": category, "image": icon_url, "author": { "@type": "Organization", "name": developer }, "aggregateRating": {"@type": "AggregateRating", "ratingValue": str(rating), "ratingCount": str(reviews_count)}, "offers": { "@type": "Offer", "price": "0.00", "priceCurrency": "USD" }}
|
| 130 |
+
schema_faq = {"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{"@type": "Question", "name": f"Is {title} Mod safe?", "acceptedAnswer": {"@type": "Answer", "text": "Yes, verified by Lexical Space."}}, {"@type": "Question", "name": f"Does {title} require root access?", "acceptedAnswer": {"@type": "Answer", "text": "No, it works on any non-rooted Android device."}}]}
|
| 131 |
schema_sysreq = {"@context": "https://schema.org", "@type": "SoftwareApplication", "name": title, "operatingSystem": "ANDROID", "applicationCategory": category, "author": { "@type": "Organization", "name": developer }, "requirements": { "@type": "SoftwareApplicationRequirements", "name": "Minimum System Requirements", "operatingSystem": "Android 9.0 (Pie)+", "ram": "4 GB+", "storage": "100 MB+" }}
|
| 132 |
schema_script = f'<script type="application/ld+json">\n[{json.dumps(schema_app)}, {json.dumps(schema_faq)}, {json.dumps(schema_sysreq)}]\n</script>'
|
| 133 |
|