stash icon indicating copy to clipboard operation
stash copied to clipboard

[Feature] Ability to set viewport dimensions for CDP scraper

Open badchoices opened this issue 2 years ago • 1 comments

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

badchoices avatar May 22 '23 03:05 badchoices

seems to be possible https://www.github.com/chromedp/chromedp/issues/245, will have to see if it's possible with the chromedp driver

feederbox826 avatar Aug 19 '24 04:08 feederbox826