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