Saravanan666/pypi-org huggingface dataset:
Package: chromeless
chromelessAWS lambda with selenium & python is powerful solution.
Let's access this benefit easily!Don't create lambda functions every time. Just create this once.Write the method.Selenium dynamically execute your script.Example# Write the method to a file. (NOT interactive mode.)defget_title(self,url):self.get(url)returnself.title# Attach the method and then call it.fromchromelessimportChromelesschrome=Chromeless()chrome.attach(get_title)print(chrome.get_title("https://google.com"))# Returns GoogleYou can also provide boto3 session object if you don't want to use default aws profile:fromchromelessimportChromelessfromboto3.sessionimportSessionsession=Session(aws_access_key_id='<YOUR ACCESS KEY ID>',aws_secret_access_key='<YOUR SECRET KEY>',region_name='<REGION NAME>')# orsession=Session(profile_name='<YOUR_PROFILE_NAME>')chrome=Chromeless(boto3_session=session)Or also you can just set appropriate environment vars works with boto3,
so it will auto detect your choice e.g.:# In mac or linux
export AWS_DEFAULT_REGION=<your aws region>

# In windows
set AWS_DEFAULT_REGION=<your aws region>Installinggit clone --depth 1 https://github.com/umihico/pythonista-chromeless.git chromeless && cd $_sls deploy --region YOUR_REGIONpip install chromelessThat's it! Now run theexample.pyand confirm your selenium works in lambda functions!TipsDon't call selenium native methods directly.Solution is wrapping.# BAD EXAMPLEchrome=Chromeless()chrome.get("https://google.com")# Not a attached method. AttributeError will be raised.chrome.title# Same. AttributeError.# SOLUTIONdefwrapper(self,url):self.get(url)returnself.titlechrome=Chromeless()chrome.attach(wrapper)print(chrome.wrapper("https://google.com"))# prints 'Google'.print(chrome.wrapper("https://microsoft.com"))# But you can execute as many times as you want.print(chrome.wrapper("https://apple.com"))# Arguments are adjustable each time.Multiple methods are also attachable.deflogin(self):self.get("https://example.com/login")self.find_element_by_id("username").send_keys("umihico")self.find_element_by_id("password").send_keys("password")self.find_element_by_name("submit").click()deftest1(self):self.login()self.get("https://example.com/")deftest2(self):self.login()self.get("https://example.com/logout")chrome=Chromeless()chrome.attach(login)# You can attach multiple methods too.chrome.attach(test1)# It means you can also refactor the common code.chrome.attach(test2)print(chrome.test1())print(chrome.test2())To screenshot# BAD EXAMPLEdefbad_wrapper(self):self.get("https://google.com")self.save_screenshot("screenshot.png")# There's no sense in saving files in AWS Lambda.# SOLUTIONdefgood_wrapper(self):self.get("https://google.com")returnself.get_screenshot_as_png()# return image in binary format.chrome=Chromeless()chrome.attach(good_wrapper)png=chrome.good_wrapper()# then write then image down locally.withopen("screenshot.png",'wb')asf:f.write(png)LicenseThe project is licensed under the MIT license.
Package: chrome-local-storage
Chrome Local StorageThis Python package makes it easy to interact with Google Chrome local storage,
either a locally-running browser or any remote browser that supports remote
debugging (e.g. Chrome on Android viaadbport forwarding).PrerequisitesInstallation is viapip:pipinstallchrome-local-storageChrome must be running with the debugging port active for the library
to connect. There are various methods to do this, for example, on Windows:chrome.exe --remote-debugging-port=9222And on MacOS:/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222The library will also work on any mobile device that supports remote debugging on Chrome,
For example, on Android, use theAndroid Debug Bridgeto set up a port forward as follows:adbforwardtcp:9222localabstract:chrome_devtools_remoteIn all of the above examples, the debugger will be available atlocalhost:9222which is what the library expects by default.UsageBasic usage is as follows:importchrome_local_storagelocal_storage=chrome_local_storage.ChromeLocalStorage()local_storage.set('example.com','my-key','my-value')value=local_storage.get('example.com','my-key')print(value)The first parameter in bothgetandsetdetermines the page
whose local storage will be used for the operation. The page must
already be open in the browser, and it does not have to be an exact
match to the whole URL as long as it's unique across open pages.In a more complex example, two constructors connect to two different
Chrome instances and copy Wordle statistics from one to the other
(the desire to transfer my streak from one device to another was
the original motivation for building this library).chrome--remote-debugging-port=9222"https://nytimes.com/games/wordle"adbforwardtcp:9223localabstract:chrome_devtools_remoteimportchrome_local_storagelaptop_storage=chrome_local_storage.ChromeLocalStorage(port=9222)phone_storage=chrome_local_storage.ChromeLocalStorage(port=9223)wordle_stats=laptop_storage.get('games/wordle','nyt-wordle-statistics')phone_storage.set('games/wordle','nyt-wordle-statistics',wordle_stats)
Package: chrome-panel
chrome_panel will be a replacement for debug_toolbar.
Instead of modifieing the page the debug output will be shown in a chrome extension.The chrome extension will add a header to the request to enable debugging. The webapp will add a header to the response with basic information and a link to get more data.this is pre alpha testing stuff.some code is directly taken from [django_debug_toolbar](https://github.com/django-debug-toolbar/django-debug-toolbar) to get testing started.this stuff is like django and django_debug_toolbar under BSD license.
Package: chromepas-noexit
chromepassFetching saved passwords from chrome database fileSupports Windows and Linux PlatformInstallationfirst ensure that you havegitandpythoninstalledLinuxinstallchromepasswith pippip3 install chromepassor from sourcegit clone https://github.com/bierschi/chromepass
cd chromepass
sudo python3 setup.py installWindowsinstallchromepasswith pippip install chromepass
py -3.8 -m pip install chromepassor from sourcegit clone https://github.com/bierschi/chromepass
cd chromepass
pip install -r requirements.txt
python setup.py installuse specific python versiongit clone https://github.com/bierschi/chromepass
cd chromepass
py -3.8 -m pip install -r requirements.txt
py -3.8 setup.py installif an error appears that microsoft viusal c++ 14.0 or greater is required, updatepipandsetuptoolsto the latest versionpy -3.8 -m pip install --upgrade pip
py -3.8 -m pip install --upgrade setuptoolsUsage and ExamplesPrint the available argumentschromepass --helpuse it without any argumentschromepassor save the results to a filechromepass --file /home/christian/chromepass.txtExecutablesInstall pyinstaller withpip3 install pyinstallercreate exe filepyinstaller --onefile --name chromepass chromepass/main.pyChangelogAll changes and versioning information can be found in theCHANGELOGLicenseCopyright (c) 2020 Bierschneider Christian. SeeLICENSEfor details
Package: chromepass
chromepassFetching saved passwords from chrome database fileSupports Windows and Linux PlatformInstallationfirst ensure that you havegitandpythoninstalledLinuxinstallchromepasswith pippip3 install chromepassor from sourcegit clone https://github.com/bierschi/chromepass
cd chromepass
sudo python3 setup.py installWindowsinstallchromepasswith pippip install chromepass
py -3.8 -m pip install chromepassor from sourcegit clone https://github.com/bierschi/chromepass
cd chromepass
pip install -r requirements.txt
python setup.py installuse specific python versiongit clone https://github.com/bierschi/chromepass
cd chromepass
py -3.8 -m pip install -r requirements.txt
py -3.8 setup.py installif an error appears that microsoft viusal c++ 14.0 or greater is required, updatepipandsetuptoolsto the latest versionpy -3.8 -m pip install --upgrade pip
py -3.8 -m pip install --upgrade setuptoolsUsage and ExamplesPrint the available argumentschromepass --helpuse it without any argumentschromepassor save the results to a filechromepass --file /home/christian/chromepass.txtExecutablesInstall pyinstaller withpip3 install pyinstallercreate exe filepyinstaller --onefile --name chromepass chromepass/main.pyChangelogAll changes and versioning information can be found in theCHANGELOGLicenseCopyright (c) 2020 Bierschneider Christian. SeeLICENSEfor details
Package: chromepilot
ChromepilotChromedriver download manager and imports shortcutsDescription:Download, unzip in memory and manages chromedrivers.
Easily integrates with Selenium webdriver.Installation> pip install chromepilotCLIusage: chromepilot [-h]  ...

Chromedriver download manager and imports shortcuts.

positional arguments:
  
    search    Searches for installs of Google Chrome locally.
    check     Checks the version of Google Chrome and chromedrivers.
    upgrade   Download newer versions of chromedriver. 'upgrade -c' cleans after install.
    clear     Searches for outdated chromedrivers locally.
    write     Writes "pilot.toml" template on current directory

options:
  -h, --help  show this help message and exit

In your runtime, try:

from chromepilot import short
driver = short.driver()  # Easy access to pre-configured driverRuntime>>># After install whith `> chromepilot upgrade`>>>fromchromepilotimportshort>>>>>>driver=short.driver()>>>driver.get('some/url')>>>entity=driver.find_element(short.By.TAG_NAME,'tag')Thepilot.tomlis a file where you define the config for your driver and
the imports shortcuts (your most used imports or those big, hard to remember Selenium imports).When you importchromepilot.shortit will search for a 'global'pilot.tomlin~/.cache/chromepilotin Linux and%LOCALAPPDATA%\chromepilotin Windows.This file will be readden wherever you importchromepilot.short.The settings for the globalpilot.tomlwill be overwritten by a 'local' one,that is, thepilot.tomlin the same directory as yourmain.py.Just do achromepilot writeto see how thepilot.tomllooks like.Moreover>>>short.global_toml# Has chromepilot parsed my global pilot.toml?True>>>short.local_toml# Has chromepilot parsed my local pilot.toml?True>>>short.parsed_options# dict containing the values passed to driver constructor{'service':{...},...}>>>driver=short.driver(use_toml=False)# Don't use tomlp.s: There's no dependencies for the CLI usage.
If your Python version is below 3.11 you will need thetomlkitpackage to usechromepilot.short.
Selenium is a dependency if you wantshort.driver()
Package: chrome-printtopdf
# Chrome-PrintToPDFLatest Chrome Browser supports getting PDFs for websites.## InstallRequires Python 3.5+pip install chrome-printtopdf## UsageOn the command line:python -m chrome_printtopdf /path/to/chrome-bin http://example.org/ out.pdfAs a library. Have a look at the source for `asyncio` API.```pythonfrom chrome_printtopdf import get_pdf_with_chrome_syncpdf_file = get_pdf_with_chrome_sync('http://example.org',chrome_binary='/path/to/chrome-bin')with open('example.org.pdf', 'wb') as f:f.write(pdf_file.read())```
Package: chrome-profile-extractor
Chrome Profile Extractorversion :1.0.1Packagepip install chrome-profile-extractorpackage link :https://pypi.org/project/chrome-profile-extractor/github link :https://github.com/HanZawNyein/chrome-profile-extractor.gitAuthor :Han Zaw NyeinAuthor Email :hanzawnyineonline@gmail.comDescription :this package for education purpose only.Example :from chrome_profile_extractor import extract_password, extract_cookie

if __name__ == '__main__':
    print(extract_password)
    print(extract_cookie)
Package: chrome_remote_shell
WarningThe remote debugging shell has been removed
from recent versions of Google Chrome,
so this Python module is only of historical interest.
For more information about the browser’s new protocol,
visit:https://developers.google.com/chrome-developer-tools/docs/remote-debuggingThis library makes it easy to communicate with the Google Chrome remote
debugging shell from Python.  To make the shell available, start Chrome
with this option:google-chrome --remote-shell-port=9222Then you can connect from Python through code like this:>>> import chrome_remote_shell
>>> shell = chrome_remote_shell.open(port=9222)
>>> shell.request('DevToolsService', command='ping')
{u'data': u'ok', u'command': u'ping', u'result': 0}The protocol is described in detail at:http://code.google.com/p/chromedevtools/wiki/ChromeDevToolsProtocolAs a convenience, the shell connection object offers a method that, by
injecting JavaScript into the first tab, commands Chrome to open a URL
in a new tab:shell.open_url('http://www.aldaily.com/')CHANGELOG2009 Feb 26.Added a conditional import ofsimplejsonso that the
module runs under Python 2.5.
Package: chrome-switcher
AboutCreate new Google Chrome sessions, persistent and temporary, separate from your default Chrome profiles.New sessions start with default Chrome settings by default, but it is possible to base new sessions off of others. Some possibilities include:Browsing in a temporary session that inherits bookmarks, cookies, and extensions from your default Chrome profile without impacting it or leaving a historyBrowsing in persistent sessions that can be accessed repeatedly, each with their own bookmarks, history, extensions, and cookies (no more signing in and out of different profiles on certain websites!)UsageAfterinstallation, run$ cswitchto open the GUI interface.A command line interface will be added in the future.OptionsNew persistent sessionCreate and open a new persistent session.Choosing this option automatically generates a shortcut file in the same directory as the new session. To use the shortcut file, drag and drop persistent session directories onto it, and that session will open.Choosing this option also automatically generates a default profile shortcut in the same directory (double click it to open it). If you're running a separate session from the default,  use this to open your default profile without being forced to exit the other session.New temporary sessionCreate and open a new temporary session.On Windows, this session's data is deleted when you close the last remaining tab of the session. On macOS, it's deleted when you quit that session of Chrome (cmd+Q). If your computer shuts off unexpectedly (e.g. dead battery), there is a small chance some data could remain.Regenerate shortcut filesRemakes the shortcut files mentionedaboveif they get lost or damaged.SettingsAs mentionedabove, you can select an existing Chrome session directory that new sessions will inherit from. For instance, you might want to inheret from the default session directory. On most computers, that directory is at:Windows:%LOCALAPPDATA%\\Google\\Chrome\\User DatamacOS:~/Library/Application Support/Google/ChromeStart new sessions with this base (or another) in the settings menu by following the GUI and selecting a folder.NOTE: Doing this may slow down new session generation as files have to be copied over.InstallationPython is required. This program was tested on Python 3.11 but should work on all maintained Python versions.Windows and macOSOption 1: pipThe easiest way to install this program is using pip:$ pip install chrome-switcherOption 2: download and runDownload the source code and run main.py:$ python3 /path/to/main.pyLinuxThis program has not been tested on Linux.
Package: chrometrace
chrometraceA Python library for creating Chrome Trace Viewer files. The Chrome Trace Viewer can be opened in
Chromium-based browsers (e.g. Google Chrome, Microsoft Edge, Chromium, ...) by enteringchrome://tracinginto the
address bar.The trace event format and types are defined inthis document.InstallationInstall the package from PyPi using the following command.pipinstallchrometraceUsageimportchrometrace# Create the trace sink as a context managerwithchrometrace.TraceSink("trace.json")astrace_sink:# Create a process tracer called myapp from the trace sinkmyapp_tracer=trace_sink.process_tracer("myapp",process_id=1337)# Create a thread tracer for the renderer thread from the process tracerrenderer_thread_tracer=myapp_tracer.thread_tracer("RendererThread",1)# Write a complete event at 10 us taking 1000 us with the name my_functionrenderer_thread_tracer.complete("my_function",timestamp_us=10,duration_us=1000)Supported trace formatsCurrently only theJSON Array Formatis supported due to its simplicity. Support for theJSON Object Formatmight be
added in the future.Supported trace eventsDuration EventsBeginEndComplete EventsInstant EventsWith different scopesCounter EventsAsync EventsFlow EventsMetadata EventsName process / threadDefine process / thread sort indexProcess labelsSample EventsObject EventsMark EventsClock Sync EventsContext Events
Package: chrome-version
Chrome VersionGet the version of Chrome installed on Windows, Linux, Mac. Cross-platform using Python, native OS detection, does not require Selenium.Installationpipinstallchrome-versionUsageModule:>>>importchrome_version>>>print(chrome_version.get_chrome_version())>>>'103.0.5060.114'CLI:chrome-version103.0.5060.114Why?At first,I needed to get the Chrome version for a project I was working on, which was usingUndetected Chromedriver. I found the gist below.When I used it in a variaty of projects, I decided to turn it into a module so I'll be free of copy/paste. It only have one functionality: getting the chrome version.Then,I decided to use it to learn more about:UsingPoetryfor packaging and dependency management.Using scripts for CLI.Versioning.License management.Documentation.Publishing a module on PyPI.Using GitHub Actions to automate the publishing process....Finally,Now it's kind of a playground for me to learn more...MotivationIt might be useful for someone.It's easier to pip install a module than copy/paste a gist.Educational Purposes: A simple module is a good practice for me to learn how to build modules and publish them on PyPI and show others how easy it is.DisclaimerBased onchrome-versionbyKory Becker.This package provides a CLI wrapper for the original project. All credit reserved to the author of the original code.
Package: chrome-webstore-download
Google Chrome Webstore Downloader - Python ModuleThis program will replace download Google Chrome Webstore extension CRX files to you computerThis work is based uponarulrajnet’s work.Installationpip3 install chrome_webstore_downloadOnce installed, You will be able to download CRX files from webstore via thechrome-webstore-downloadcommandusage: chrome-webstore-download [-h] -u URL [-f FILE]

Download CRX file from Google Chrome Webstore.

optional arguments:
  -h, --help            show this help message and exit
  -u URL, --url URL     URL of the chrome store
  -f FILE, --file FILE  Path to download CRXExamplechrome-webstore-download -u https://chrome.google.com/webstore/detail/bandcamp-downloader/nmoobgpmablfmgchfjnhkbloaobiogehDocker Usagedocker run --rm -ti -v `pwd`:/root jaymoulin/google-chrome-webstore-download <option>usage: jaymoulin/google-chrome-webstore-download [-h] -u URL [-f FILE]

Download CRX file from Google Chrome Webstore.

optional arguments:
  -h, --help            show this help message and exit
  -u URL, --url URL     URL of the chrome store
  -f FILE, --file FILE  Path to download CRXExampledocker run --rm -ti -v `pwd`:/root jaymoulin/google-chrome-webstore-download -u https://chrome.google.com/webstore/detail/bandcamp-downloader/nmoobgpmablfmgchfjnhkbloaobiogehAboutRequirementsGoogle Chrome Webstore Downloader works with Python 3 or above.Submitting bugs and feature requestsBugs and feature request are tracked on GitHubAuthorJay MOULINjaymoulin@gmail.comSee also the list of contributors which participated in this program.LicenseGoogle Chrome Webstore Downloader is licensed under the MIT License
Package: chromie
CHROMIEA simple utility CLI for packaging and maintaining chrome extensions.InstallationpipinstallchromieUsageCreate an empty project within the cwd.chromieinit
>>Whatisthenameofyourproject?
helloworldresults:hello world/
├── dist/
│   └── web store/
├── src/
│   ├── images/
│   └── manifest.json
└── .zipignoreYou can skip the prompt using the name flagchromie init -n "hello world"Create a zip file containing all folders in the src directory excluding those listed in .zipignore.cdhelloworld
chromiepack
>>Howwouldyouliketoincrementtheversion?
>>Optionsareeither'major','minor',or'patch':
patchresults:hello world/
├── dist/
│   ├── web store/
│   └── hello world-0.0.1.zip
├── src/
│   ├── images/
│   └── manifest.json
└── .zipignoreChromie helps maintainsemantic versioning specificationand provides two options for specifying the version.Increment manifest version number based on type.chromie pack -i majorSet manifest version to a specific number.chromie pack -v 1.0.0Store key-value pairs to the .chromie/settings.json file.chromie config email hello@world.comhello world/.chromie/settings.json
{
  "email": "hello@world.com"
}Web Store Deployment using a service accountThe following requires that the .chromie/settings.json file includes email, client_email, client_id, and private_key for authentication.hello world/.chromie/settings.json
{
  "email": "hello@world.com",
  "client_email": "",
  "private_key": ""
}Upload chrome extension zipfile to the Google Web Store.chromie uploadUpdate chrome extension Web Store with the latest chrome extension archive.chromie updatePublish chrome extension to the Google Web Store.chromie publishLicenseThe MIT License (MIT)Copyright (c) 2020 Steffen AnderslandPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: chromium-binary-lambda
chromium-binary-lambdaNote: The project does not provide the framework to deal with chrome.But thechrome binariesso that it can be used in eitherAWS LambdaorGcloud Functions.Free software: MIT license (including the work distributed under the Apache 2.0 license)Documentation:https://pyppeteer.github.io/pyppeteer/Installationchromium-binary-lambda requires Python >= 3.7Install withpipfrom PyPI:pip install chromium-binary-lambdaOr install the latest version fromthis github repo:pip install -U git+https://github.com/chromium-binary-lambda/chromium-binary-lambda@devUsageNote: When you install chromium-binary-lambda, it downloads the latest version of Chromium (~150MB) if it is not found on your system. If you don't prefer this behavior, ensure that a suitable Chrome binary is installed. One way to do this is to runpip install chromium-binary-lambda==<versionChrome>command before prior to install this library.ExamplesOpen web page and take a screenshot usinPlaywright:pip install playwrightimportasynciofromchromium_binary_lambdaimportchromium_executable,default_argsfromplaywright.async_apiimportasync_playwrightasyncdefmain():client=awaitasync_playwright().start()browser=awaitclient.chromium.launch(executable_path=chromium_executable(),args=default_args)page=awaitbrowser.new_page()awaitpage.goto('https://example.com')awaitpage.screenshot({'path':'example.png'})awaitbrowser.close()asyncio.get_event_loop().run_until_complete(main())Creditspython setup.py sdisttwine upload --repository pypi ./dist/*.tar.gzThis package was created byFabricio Silva.