stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
8.96k stars 785 forks source link

[Feature] Ability to set viewport dimensions for CDP scraper #3750

Open badchoices opened 1 year ago

badchoices commented 1 year ago

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

feederbox826 commented 1 month ago

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