File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
scrapegraph-py/scrapegraph_py Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -573,6 +573,9 @@ async def smartscraper(
573573 output_schema : Optional [BaseModel ] = None ,
574574 number_of_scrolls : Optional [int ] = None ,
575575 total_pages : Optional [int ] = None ,
576+ mock : bool = False ,
577+ plain_text : bool = False ,
578+ render_heavy_js : bool = False ,
576579 stealth : bool = False ,
577580 ):
578581 """Send a smartscraper request with optional pagination support and cookies"""
@@ -591,6 +594,8 @@ async def smartscraper(
591594 logger .debug (f"π Total pages to scrape: { total_pages } " )
592595 if stealth :
593596 logger .debug ("π₯· Stealth mode enabled" )
597+ if render_heavy_js :
598+ logger .debug ("β‘ Heavy JavaScript rendering enabled" )
594599 logger .debug (f"π Prompt: { user_prompt } " )
595600
596601 request = SmartScraperRequest (
@@ -602,6 +607,9 @@ async def smartscraper(
602607 output_schema = output_schema ,
603608 number_of_scrolls = number_of_scrolls ,
604609 total_pages = total_pages ,
610+ mock = mock ,
611+ plain_text = plain_text ,
612+ render_heavy_js = render_heavy_js ,
605613 stealth = stealth ,
606614 )
607615
Original file line number Diff line number Diff line change @@ -584,9 +584,10 @@ def smartscraper(
584584 output_schema : Optional [BaseModel ] = None ,
585585 number_of_scrolls : Optional [int ] = None ,
586586 total_pages : Optional [int ] = None ,
587- mock :bool = False ,
588- plain_text :bool = False ,
589- stealth :bool = False
587+ mock : bool = False ,
588+ plain_text : bool = False ,
589+ render_heavy_js : bool = False ,
590+ stealth : bool = False
590591 ):
591592 """Send a smartscraper request with optional pagination support and cookies"""
592593 logger .info ("π Starting smartscraper request" )
@@ -604,6 +605,8 @@ def smartscraper(
604605 logger .debug (f"π Total pages to scrape: { total_pages } " )
605606 if stealth :
606607 logger .debug ("π₯· Stealth mode enabled" )
608+ if render_heavy_js :
609+ logger .debug ("β‘ Heavy JavaScript rendering enabled" )
607610 logger .debug (f"π Prompt: { user_prompt } " )
608611
609612 request = SmartScraperRequest (
@@ -617,6 +620,7 @@ def smartscraper(
617620 total_pages = total_pages ,
618621 mock = mock ,
619622 plain_text = plain_text ,
623+ render_heavy_js = render_heavy_js ,
620624 stealth = stealth ,
621625 )
622626 logger .debug ("β
Request validation passed" )
You canβt perform that action at this time.
0 commit comments