Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -1077,7 +1077,9 @@ async function generateFakeTweet(inputData) {
|
|
| 1077 |
await page.click(`#radio-\\:${inputData.theme}\\:`); // Dynamic theme selection
|
| 1078 |
|
| 1079 |
// Wait for the result image to appear
|
| 1080 |
-
await page.waitForSelector('#__next > main > div.css-1a1quzv > div.css-rgogwv > div > div.css-1x69bgs > div.css-0 > div > div > img');
|
|
|
|
|
|
|
| 1081 |
|
| 1082 |
// Get the result image as base64
|
| 1083 |
const resultBase64 = await page.$eval('#__next > main > div.css-1a1quzv > div.css-rgogwv > div > div.css-1x69bgs > div.css-0 > div > div > img', (img) => {
|
|
|
|
| 1077 |
await page.click(`#radio-\\:${inputData.theme}\\:`); // Dynamic theme selection
|
| 1078 |
|
| 1079 |
// Wait for the result image to appear
|
| 1080 |
+
//await page.waitForSelector('#__next > main > div.css-1a1quzv > div.css-rgogwv > div > div.css-1x69bgs > div.css-0 > div > div > img');
|
| 1081 |
+
|
| 1082 |
+
await delay(5000)
|
| 1083 |
|
| 1084 |
// Get the result image as base64
|
| 1085 |
const resultBase64 = await page.$eval('#__next > main > div.css-1a1quzv > div.css-rgogwv > div > div.css-1x69bgs > div.css-0 > div > div > img', (img) => {
|