stash
stash copied to clipboard
[Feature] Ability to set viewport dimensions for CDP scraper
Is your feature request related to a problem? Please describe. When scraping scenes I have a site that has a UI that is much easier to scrape when it is in the mobile view, the only way to force it is by setting the view port size...
Describe the solution you'd like
Under the scraper config.yaml file add the following lines to the driver section
driver:
useCDP: true
sleep: 2
viewport: # <--
width: 438 # <--
height: 1200 # <--
Describe alternatives you've considered Force setting CDP to a particular viewport but that is not possible
seems to be possible https://www.github.com/chromedp/chromedp/issues/245, will have to see if it's possible with the chromedp driver