chore: change to true headless & type input url
This commit is contained in:
parent
7a9ddf2679
commit
c99e98185c
|
|
@ -76,7 +76,7 @@ export default function AnalysisClient() {
|
|||
Tautan Produk 1
|
||||
</label>
|
||||
<Input
|
||||
type="text"
|
||||
type="url"
|
||||
placeholder="Contoh: https://tokopedia.com/..."
|
||||
className={`${errors.url1 ? "border-sentiment-negative" : "focus:ring-primary"}`}
|
||||
{...register("url1")}
|
||||
|
|
@ -92,7 +92,7 @@ export default function AnalysisClient() {
|
|||
Tautan Produk 2
|
||||
</label>
|
||||
<Input
|
||||
type="text"
|
||||
type="url"
|
||||
placeholder="Contoh: https://tokopedia.com/..."
|
||||
className={`w-full ${errors.url2 ? "border-sentiment-negative" : "focus:ring-primary"}`}
|
||||
{...register("url2")}
|
||||
|
|
@ -111,7 +111,7 @@ export default function AnalysisClient() {
|
|||
Tautan Produk 3
|
||||
</label>
|
||||
<Input
|
||||
type="text"
|
||||
type="url"
|
||||
placeholder="Contoh: https://tokopedia.com/..."
|
||||
className={`w-full ${errors.url3 ? "border-sentiment-negative" : "focus:ring-primary"}`}
|
||||
{...register("url3")}
|
||||
|
|
@ -132,7 +132,7 @@ export default function AnalysisClient() {
|
|||
<div className="flex gap-2">
|
||||
<div className="flex-1">
|
||||
<Input
|
||||
type="text"
|
||||
type="url"
|
||||
placeholder="Contoh: https://tokopedia.com/..."
|
||||
className={`${errors.url4 ? "border-sentiment-negative" : "focus:ring-primary"}`}
|
||||
{...register("url4")}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ export async function scrapeTokopediaProduct(
|
|||
const maxPages = 5;
|
||||
|
||||
for (let i = 1; i <= maxPages; i++) {
|
||||
console.log(`📄 Scraping Halaman ${i}...`);
|
||||
|
||||
await page
|
||||
.waitForSelector('[data-testid="lblItemUlasan"]', { timeout: 8000 })
|
||||
.catch(() => null);
|
||||
|
|
|
|||
Loading…
Reference in New Issue