Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -134,12 +134,14 @@ def convert_endpoint():
|
|
| 134 |
# --- REPLACEMENT FOR IMGKIT ---
|
| 135 |
with sync_playwright() as p:
|
| 136 |
browser = p.chromium.launch()
|
| 137 |
-
|
|
|
|
|
|
|
| 138 |
page.set_content(full_html)
|
| 139 |
|
| 140 |
# Locate the specific element we want to capture
|
| 141 |
element = page.locator("#output-wrapper")
|
| 142 |
-
element.scroll_into_view_if_needed()
|
| 143 |
|
| 144 |
#element = page.locator("")
|
| 145 |
|
|
|
|
| 134 |
# --- REPLACEMENT FOR IMGKIT ---
|
| 135 |
with sync_playwright() as p:
|
| 136 |
browser = p.chromium.launch()
|
| 137 |
+
context = browser.new_context(device_scale_factor=1)
|
| 138 |
+
|
| 139 |
+
page = context.new_page()
|
| 140 |
page.set_content(full_html)
|
| 141 |
|
| 142 |
# Locate the specific element we want to capture
|
| 143 |
element = page.locator("#output-wrapper")
|
| 144 |
+
#element.scroll_into_view_if_needed()
|
| 145 |
|
| 146 |
#element = page.locator("")
|
| 147 |
|