Skip to content

Commit

Permalink
Merge branch 'main' into small_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 authored Aug 14, 2023
2 parents 6446315 + 3487770 commit a1f8a7b
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions dispatcher/backend/src/common/schemas/offliners/zimit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from common.schemas.fields import validate_output, validate_zim_filename

# https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts
# https://github.com/puppeteer/puppeteer/blob/
# main/packages/puppeteer-core/src/common/Device.ts
validate_devicelist = validate.OneOf(
sorted(
[
Expand All @@ -25,14 +27,22 @@
"Galaxy S9+ landscape",
"Galaxy Tab S4",
"Galaxy Tab S4 landscape",
"iPad",
"iPad landscape",
"iPad (gen 6)",
"iPad (gen 6) landscape",
"iPad (gen 7)",
"iPad (gen 7) landscape",
"iPad Mini",
"iPad Mini landscape",
"iPad Pro",
"iPad Pro landscape",
"iPad Pro 11",
"iPad Pro 11 landscape",
"iPhone 4",
"iPhone 4 landscape",
"iPhone 5",
"iPhone 5 landscape",
"iPhone 6",
"iPhone 6 landscape",
"iPhone 6 Plus",
Expand Down Expand Up @@ -73,12 +83,13 @@
"iPhone 13 Pro Max landscape",
"iPhone 13 Mini",
"iPhone 13 Mini landscape",
"JioPhone 2",
"JioPhone 2 landscape",
"Kindle Fire HDX",
"Kindle Fire HDX landscape",
"LG Optimus L70",
"LG Optimus L70 landscape",
"Microsoft Lumia 550",
"Microsoft Lumia 550 landscape",
"Microsoft Lumia 950",
"Microsoft Lumia 950 landscape",
"Nexus 10",
Expand Down Expand Up @@ -113,13 +124,6 @@
"Pixel 5 landscape",
"Moto G4",
"Moto G4 landscape",
"Desktop Chrome HiDPI",
"Desktop Edge HiDPI",
"Desktop Firefox HiDPI",
"Desktop Safari",
"Desktop Chrome",
"Desktop Edge",
"Desktop Firefox",
]
)
)
Expand Down Expand Up @@ -301,8 +305,7 @@ class Meta:
mobile_device = StringEnum(
metadata={
"label": "As device",
"description": "Device to crawl as. "
"See Playwright's deviceDescriptorsSource",
"description": "Device to crawl as. See Pupeeter's Device.ts for a list",
},
data_key="mobileDevice",
required=False,
Expand Down

0 comments on commit a1f8a7b

Please sign in to comment.