Skip to main content

Platinum

License PyPI version Wheel

Chromium - Frequently used google chrome commands mappings.

There are lots of command lines which can be used with the Google Chrome browser. Some change behavior of features, others are for debugging or experimenting. This page lists the available switches including their conditions and descriptions. Last update occurred on 2020-04-16 from https://peter.sh/experiments/chromium-command-line-switches/.

Usage Example

from platinum import Chromium
from selenium import webdriver

options = webdriver.ChromeOptions()
# Run in headless mode, i.e., without a UI or display server dependencies.
options.add_argument(Chromium.HEADLESS)

# Prevent infobars from appearing.
# This feature has been disabled.
# options.add_argument(Chromium.DISABLE_INFOBARS)

# Starts the browser maximized, regardless of any previous settings.
options.add_argument(Chromium.START_MAXIMIZED)

chrome = webdriver.Chrome(options=options)

generate_user_agent - A User-Agent generator.

This module is for generating random, valid web navigator's User-Agent HTTP headers.

Functions:

  • generate_user_agent: generates User-Agent HTTP header

Support:

  • os: win, linux, mac, android, ios
  • device: desktop, smartphone
  • navigator: chrome, firefox, ie, edge, safari, opera

Windows: Chrome, Firefox, IE, Edge, Opera
Linux: Chrome, Firefox, Opera
Mac: Chrome, Firefox, Safari, Opera
Android: Chrome, Firefox, Opera
iOS: Chrome, Firefox, Safari, Opera

Usage Example

>>> from platinum import generate_user_agent
>>> generate_user_agent()
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3504.86 Safari/537.36'
>>> generate_user_agent(os=('mac', 'linux'))
'Mozilla/5.0 (X11; Ubuntu; Linux i686 on x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3384.62 Safari/537.36'
>>> generate_user_agent(navigator='edge')
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763'
>>> generate_user_agent(device_type='smartphone')
'Mozilla/5.0 (Linux; Android 8.0; OPPO R11 Plus Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3191.41 Mobile Safari/537.36'
>>> generate_user_agent(os='ios')
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/601.4.4 (KHTML, like Gecko) FxiOS/62.0 Mobile/15E218 Safari/601.4'
>>> generate_user_agent(navigator='safari', os='mac')
'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_13_0; zh-cn) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/11.1.2 Safari/602.3.12'

Command Line Usage

$ gua
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/15.14986

$ gua -n chrome
Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3489.10 Safari/537.36

$ gua -o android
Mozilla/5.0 (Linux; Android 8.1; Huawei P20 Lite Build/OPR3.170623.008) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3297.48 Mobile Safari/537.36

$ gua -n safari -o ios
Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_3 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/9.0 Mobile/13G34 Safari/602.2

Installation

pip install -U platinum

Change Log

Release files for platinum 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for platinum 1.5.0
File Size Uploaded
platinum-1.5.0.tar.gz 86.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for platinum 1.5.0
File Interpreter ABI Platform
platinum-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 172.2 kB

Release files / platinum-1.5.0.tar.gz

Download URL platinum-1.5.0.tar.gz
Size 86.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f71403a30393ff91ec02778ff64d3f426b62f7914d33c37021b1ddc34de42108
BLAKE2b-256 checksum
How to use checksums
b1c5c5e29487e41efe4b332d6655693154c9800b780b80a4823fdc5de96b55f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release files / platinum-1.5.0-py3-none-any.whl

Download URL platinum-1.5.0-py3-none-any.whl
Size 86.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b46c7c507d26353fc339c62ab34c91ef023dc1a48a5a4d6ca22dde246a437a60
BLAKE2b-256 checksum
How to use checksums
9f25f9f84d9fa1484e0c867a100cedfa58e655e7571ded6cd25ca10c4acfb9ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page