Saravanan666/pypi-org huggingface dataset:
Package: browser-automationpy
An open-source Python framework for Browser Automation : browser-automationpyChaudhari, C., Purswani, G. (2023). Stock Market Prediction Techniques Using Artificial Intelligence: A Systematic Review. In: Kumar, S., Sharma, H., Balachandran, K., Kim, J.H., Bansal, J.C. (eds) Third Congress on Intelligent Systems. CIS 2022. Lecture Notes in Networks and Systems, vol 608. Springer, Singapore.https://doi.org/10.1007/978-981-19-9225-4_17IntroductionFeaturesInstallationContributionIntroductionThe main objective of the Python framework is easily launching custom automated browser.
This framework doesn't ask you to download any browser binaries. Browser automation is very useful in data mining and
automation of monotonous work.AuthorsThe packagessystematic-reviewpyandbrowser-automationpyare part of Research paperAn Open-Source Python Framework For Systematic Review Based On PRISMAcreated byChandravesh chaudhari, Doctoral candidate atCHRIST (Deemed to be University), Bangalore, Indiaunder supervision ofDr. Geetanjali purswani.Featuresone line code to install all supported browsers.easy customisation for browsers such as adding extensions and changing download paths.easy methods for clicking buttons or inputting data into web elements.support for chrome, safari, mozilla, edge etc.No need to download binary.Advantages over manual methodsSaves timeAutomate monotonous tasksInstallationThis project is available atPyPI. For help in
installation checkinstructionspython3-mpipinstallbrowser-automationpyDependenciesRequiredwebdriver-manager- Library provides the way to automatically manage drivers for different browsersselenium- The selenium package is used to automate web browser interaction from Python.OptionalPyAutoGUI- PyAutoGUI lets Python control the mouse and keyboard, and other GUI automation tasks.Important linksDocumentationQuick tourProject maintainer (feel free to contact)Future ImprovementsLicenseContributionall kinds of contributions are appreciated.Improving readability of documentationFeature RequestReporting bugsContribute codeAsking questions in discussions
Package: browsercam
# browsercamThis module was built for Chromebooks running Crostini, which currentlydon't have access to the webcam module. Using browsercam is simple:```pythonimport browsercamdef process_image(image):size = len(image)print('Captured image is {} bytes'.format(isize))webcam = browsercam.Webcam()webcam.on_capture(process_image)webcam.start()```
Package: browsercast
BrowserCast is an IPython Notebook plugin which allows IPython Notebook
notebooks to be set to audio, creating a screencast-style presentation in the
browser - a browser cast.Status: BrowserCast is under active development, and should work well
enough that you can use it to create useful presentations! It is currently
implemented as a bookmarklet instead of a “real” Notebook plugin, but that
will change soon. To give it a try, see:http://wolever.github.io/browsercast/Traditional screencasts talking about BrowserCast:Why is BrowserCast cool?http://youtu.be/OAIyHgbi5rMCreating a presentation with BrowserCast:http://youtu.be/UhHRuPPFWtEOld proof-of-concept demonstration:http://youtu.be/CYxZq4rZw0cFAQQ: What about recording audio in the browser too?A: Unfortunately the APIs aren’t great at the moment, and Audacity is a very
good tool for creating and editing audio.Q: Can people watching a browsercast interact with the IPython notebook?A: In theory they can, but there are some technical challenges that make it
unlikely to be properly supported.
Package: browser_compare
This small library detects browser downgrades and major changes,
including OS/browser family changes. It could be used as an indicator
of user browser authenticity: if authentication cookies are used
on downgraded browser, it might be restored from a backup.Similarly, cookie that appears on completely different platform
or browser is probably either stolen or copied. This check is not
foolproof, as attacker can easily spoof user-agent too.Example usage:from browser_compare import *

old_ua = 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0'
new_ua = 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0'
another_ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:27.0) Gecko/20100101 Firefox/27.0'

bc = BrowserCompare(old_ua, new_ua)
print bc.compare() # True

bc = BrowserCompare(new_ua, old_ua)
print bc.compare() # raises UADowngradedException

bc = BrowserCompare(old_ua, another_ua)
print bc.compare() # raises UAChangedExceptionUseUAExceptionto catch any problems with user-agents, if you don’t
care why it was rejected. Additional information is available inexception.msg.LicenseLicensed under MIT license:Copyright (c) 2014 Olli jarvaolli@jarva.fiPermission 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: browsercontroller
Selenium Browser Controller for apt Firefox on Ubuntu 22.10![Python 3.10][python_badge]![License: AGPL v3][agpl3_badge]![Code Style: Black][black_badge]![Code Coverage][codecov_badge]Initialises a Selenium browser controller for a specific firefox profile on an
Ubuntu 22.10 system for anaptinstallation of Firefox.Put into a separate pip package to remove boiler-plate code from other
repositories that control the browser.UsageFirst install this pip package with:pip install browsercontrollerThen run:frombrowsercontroller.get_controllerimport(get_ubuntu_apt_firefox_controller,)get_ubuntu_apt_firefox_controller(url="https://www.startpagina.nl")Hide automation/"are u human?"Some entities use checks to verify you are human. at 20223-09-19 those can be
evaded using either:playwrightpuppeteerInstallation playwrightpipinstallplaywright
playwrightinstallInstallation puppeteernpminstallpuppeteer
npminstallpuppeteer-extra-plugin-stealth
npminstallpuppeteerpuppeteer-extrapuppeteer-extra-plugin-stealth# Then run the example script with:nodepuppeteer_stealth.jsDrawback playwright implementationAn example of each of those two options is included. One drawback of the way
playwright is used in this repository, is that the entire sequence of actions
must occur within a single method, because the playwright browsercontroller is
created within a Pythonwithstatement, and returning thePageobject from
the initialisation function:initialise_playwright_browsercontroller()yields
"loop closed error."Drawback puppeteerIt is implemented in javascript. Pypeteer is an archived Python approximation
of puppeteer. However, that is limited in its functionalities and not supported anymore.Warning:Checks whether asnapversion of Firefox is installed, and if yes, removes it
and installs anaptversion of Firefox instead. You'll lose browser history,
logins and bookmarks if you don't have anaptversion of Firefox.UpdatingBuild the pip package with:pip install --upgrade pip setuptools wheel
pip install twineInstall the pip package locally with:pip install -e .Upload the pip package to the world with:rm -r dist
rm -r build
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/\*
Package: browsercookie
Thebrowsercookiemodule loads cookies used by your web browser
into a cookiejar object. This can be useful if you want to use python to
download the same content you see in the web browser without needing to
login.InstallpipinstallbrowsercookieOn Windows the builtin sqlite module will raise an error when loading
the FireFox database. An updated version of sqlite can be installed with:pipinstallpysqliteUsageHere is a hack to extract the title from a webpage:>>>importre>>>get_title=lambdahtml:re.findall('<title>(.*?)</title>',html,flags=re.DOTALL)[0].strip()And here is the webpage title when downloaded normally:>>>importurllib2>>>url='https://bitbucket.org/'>>>public_html=urllib2.urlopen(url).read()>>>get_title(public_html)'Git and Mercurial code management for teams'Now let’s try withbrowsercookie- make sure you are logged into
Bitbucket in Firefox before trying this example:>>>importbrowsercookie>>>cj=browsercookie.firefox()>>>opener=urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))>>>login_html=opener.open(url).read()>>>get_title(login_html)'richardpenman / home &mdash; Bitbucket'Differences with Python3:>>>importurllib.request>>>public_html=urllib.request.urlopen(url).read()>>>opener=urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))You should see your own username here, meaning the module successfully
loaded the cookies from Firefox.Here is an alternative example withrequests, this time
loading the Chrome cookies. Again make sure you are logged into
Bitbucket in Chrome before running this:>>>importrequests>>>cj=browsercookie.chrome()>>>r=requests.get(url,cookies=cj)>>>get_title(r.content)'richardpenman / home &mdash; Bitbucket'Alternatively if you don’t know/care which browser has the cookies you
want then all available browser cookies can be loaded:>>>cj=browsercookie.load()>>>r=requests.get(url,cookies=cj)>>>get_title(r.content)'richardpenman / home &mdash; Bitbucket'ContributeSo far the following platforms are supported:Chrome:Linux, OSX, WindowsFirefox:Linux, OSX, WindowsHowever I only tested on a single version of each browser and so am not
sure if the cookie sqlite format changes location or format in
earlier/later versions. If you experience a problem pleaseopen an
issuewhich includes details of the browser version and operating system. Also
patches to support other browsers are very welcome, particularly for
Internet Explorer on Windows.AcknowledgementsNathan Henrie for his example ofhow to decode the Chrome cookiesGraeme Robinson for his Chrome Windows patch
Package: browsercookiejar
browsercookiejaris a Python CookieJar set for Chrome, Firefox and MSIE.Requirementspycrypto for Chrome on LinuxSetup$ pip install browsercookiejarUsageRun this code, logging in to Google on Chrome:import re
import urllib2
import browsercookiejar

cj = browsercookiejar.ChromeCookieJar()
cj.load()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
body = opener.open('http://www.google.com').read()
account = re.search(r'>([^>]+@gmail\.com)', body).group(1)

print 'Your account is', accountChangelog0.1 (2014-08-30)Initial release
Package: browserdebuggertools
browser-debugger-toolsOverviewThe purpose is to provide a python client to connect to the debugger tools of a web-browser.Currently supportsconnecting toGoogle-Chrome/Chromiumover the devtools protocol, via a wrapped websockets client.Feel free to extend and add support for other browsersas required.For improved performance, install the wsaccel python libhttps://pypi.org/project/wsaccel/Example UsageStart Google-Chrome, passing a remote debugger port argument, for example on Ubuntu:$ google-chrome-stable --remote-debugging-port=9899In a python console, you can connect to the remote debugging port and enable the Page domain.>> devtools_client = ChromeInterface(9899, domains={"Page": {}})The client provides some devtools interface methods, for example:>> with devtools_client.set_timeout(10):
   ... devtools_client.take_screenshot("/tmp/screenshot.png")Or more generally you can call remote methods according to the devtools protocol spec (https://chromedevtools.github.io/devtools-protocol/tot/Network), for example>> devtools_client.execute(domain="Network", method="enable")
>> devtools_client.execute("Network", "setUserAgentOverride", {"userAgent": "Test"})
Package: browserdriver
Python Browser DriverA Python based SDK for web automation usingSelenium.LicenseReleased underMITby@Mauricio.Email:MauricioOverviewTo use this application you must have any of the following browsers installed:Wiki - Full documentationTable of contents1.IntroductionShows how to get access to your API key.2.Getting StartedShows how to log in to the client and use the basic code interface3.ServicesData provided outside of the game server. Like server status, user id, and auto extension plan.4.GameServerData directly related to the game server. This includes the player list, game settings, etc.InstallationIn your terminal install the WebDriver package with pip.pipinstallbrowserdriverBrowser DriversChoose the driver from one of the browsers you have installed:ChromeFirefoxOperaEdgeChromeDownload the Chrome DriverLocate your Chrome browser version. Open the menu list on Chrome and navigate
down to theHelpoption. Then click onAbout Google Chrome. In the example
below, the driver to download is version111.Chrome is up-to-date.Version 111.#.####.### (Official Build) (64-bit)Navigate over toChromeDriverand download
the driver which compliments your browser.Environment VariablesPlace the Chrome Driver somewhere accessible by your project. Copy the path location of
the Chrome Driver.Windows PCOpen the system properties in the control panel. At the bottom right, click onEnvironments Variables.... A new window should pop up.Create a newUser variable:Variable Name: CHROME_DRIVERVariable Value: C:/YOUR_CHROME_DRIVER_PATHMacOS - BashOpen the terminal and open the bash profile.vi~/.bash_profileWrite into the editor:exportCHROME_DRIVER=./YOUR_CHROME_DRIVER_PATHExampleStarting the WebDriver.fromwebdriverimportDriverfromwebdriver.chromeimportChromeimportoschrome=Chrome(os.getenv('CHROME_DRIVER'))driver=Driver(chrome)driver.get('https://www.google.com')# Must quit chrome before quitting the application# else the driver will remain hanging until PC reboot.chrome.quit()
Package: browser-driver-manager
browser_driver_manager用于管理浏览器驱动程序的下载和安装。该类包含了一些方法来获取本地浏览器版本、提取Chrome版本、获取最新版本的驱动程序版本号和下载链接、检查本地安装的Chromedriver版本、检查Chromedriver是否存在、创建下载文件夹、下载和解压缩浏览器驱动程序等功能。类属性download_dir(str): 存储下载文件的文件夹路径。方法__init__(self):
初始化 BrowserDriverManager 类并创建下载文件夹。get_browser_version(self) -> str:
获取本地浏览器版本。Returns: 本地浏览器的版本号。Notes: 此方法仅适用于 Windows 操作系统和 Google Chrome 浏览器。get_chrome_version(self, browser_version: str) -> str:
从浏览器版本中提取 Chrome 版本。Args:browser_version (str): 浏览器版本号。Returns: Chrome 版本号。Notes: 此方法假设浏览器版本号遵循标准的 x.y.z 格式。例如，如果浏览器版本为 "94.0.4606.81"，则提取的 Chrome 版本为 "94.0.4606"。get_latest_version_and_download_url(self, chrome_version: str) -> Tuple[str, str]:
根据 Chrome 版本获取最新版本的驱动程序版本号和下载链接。Args:chrome_version (str): Chrome 版本号。Returns: 包含最新版本的驱动程序版本号和对应的下载链接的元组。Notes: 此方法使用 ChromeDriver 的下载链接模板，并将 Chrome 版本号插入其中。例如，如果 Chrome 版本为 "94.0.4606"，则生成的下载链接为 "https://chromedriver.storage.googleapis.com/94.0.4606/chromedriver_win32.zip"。get_chromedriver_version(self) -> str or None:
获取本地安装的 Chromedriver 版本号。Returns: Chromedriver 版本号，如果未找到版本号则返回 None。check_chromedriver_exists(self) -> bool:
检查 Chromedriver 是否存在于下载文件夹中。Returns: 如果 Chromedriver 存在，则返回 True；否则返回 False。create_download_folder(self) -> str:
在当前工作路径下创建下载文件夹路径。Returns: 下载文件夹的路径。Notes: 如果 "download" 文件夹已经存在，则不进行任何操作。download_Browser(self, download_url: str) -> str:
下载 Browser 驱动程序。Args:download_url (str): 下载链接。Returns: 下载的文件路径。Notes: 此方法使用 requests 库下载文件，并将其保存到指定路径。extract_Browser(self, download_path: str):
解压缩 Browser 驱动程序。Args:download_path (str): 下载的文件路径。Notes: 此方法使用 zipfile 库解压缩下载的文件，并将文件提取到下载文件夹中。clean_up(self, download_path: str):
清理下载的文件。Args:download_path (str): 下载的文件路径。Notes: 此方法删除下载的文件，以清理不再需要的文件。download_Browser_for_current_browser(self):
根据本地浏览器版本下载相应版本的 Browser 驱动程序。
Package: browser-extension
Browser ExtensionA tool to download and use browser extensions on Selenium/Browsers!Installationpipinstallbrowser-extensionUsageFor Download and Usefrombrowser_extensionimportChromeExtensionextension_url='<extension_url>'chrome_version='<chrome_version>'path=ChromeExtension(extension_url,chrome_version).download()print(path)Use With Seleniumfrombrowser_extensionimportChromeExtension# Load the extensionextension_url='<extension_url>'chrome_version='<chrome_version>'path=ChromeExtension(extension_url,chrome_version).download()# Load the extension in Seleniumoptions=webdriver.ChromeOptions()options.add_extension(path)driver=webdriver.Chrome(options=options)# or add to your existing options
Package: browserfetch
Fetch using your browser.Let the browser manage cookies for you.⚠️ This project is a very simple implementation. Not tested thoroughly. Consider it a proof of concept.UsageYou’ll run a Python script containing some code like this:fromasyncioimportgather,new_event_loopfrombrowserfetchimportfetch,get,post,run_serverasyncdefmain():response1,response2,reponse3=awaitgather(get('https://example.com/path1',params={'a':1}),fetch('https://example.com/image.png'),post('https://example.com/path2',data={'a':1}),)# do stuff with retrieved responsesloop=new_event_loop()loop.create_task(start_server())loop.run_until_complete(main())Open your browser, gotohttp://example.com(perhaps solve a captcha and log in).Copy the contents ofbrowserfetch.jsfile and paste it in browser’s console. (You can use a browser extensions likeviolentmonkey/tampermonkeyto do this step for you.)That’s it! Your Python script starts handling requests.
The browser tab should remain open of-coarse.The server can handle multiple websocket connections from different websites simultaneously.How it worksbrowserfetchcommunicates with your browser using a websocket. Thefetchfunction just passes the request to browser and it is the browser that handles the actual request. Response data is sent back to Python using the same WebSocket connection.Motivationsbrowser_cookie3 stopped working on Chrome-based browsers. There is a workaround: ShadowCopy, but it requires admin privilege.Another issue with browser_cookie’s approach is that it retrieves cookies from cookie files, but these files are not updated instantly. Thus, you might have to wait or retry a few times before you can successfully access newly set cookies.ShadowCopying and File access are slow and inefficient operations.DownsidesSetting upbrowserfetchis more cumbersome since it requires running a Python server and also injecting a small script into the webpage. Usingbrowser_cookie3might be a better choice if there are many websites that you need to communicate with.
Package: browserhistory
BrowserHistory Modulebrowserhistory is a simple Python module that extracts browser history from a user's local computer and writes the data to csv files.Platforms: Linux, MacOS, and Windows.
Suported Browsers: Firefox, Google Chrome, and Safari.Installation$python3-mpipinstallbrowserhistoryor$gitclonehttps://github.com/kcp18/browserhistoryOverviewFunctions:get_browserhistory() -> dictget_database_paths() -> dictget_username() -> strwrite_browserhistory_csv() -> NoneExample:Example=======>>>importbrowserhistoryasbh>>>dict_obj=bh.get_browserhistory()>>>dict_obj.keys()>>>dict_keys(['safari','chrome','firefox'])>>>dict_obj['safari'][0]>>>('https://mail.google.com','Mail','2018-08-14 08:27:26')# Write the data to csv files in the current working directory.# safari_browserhistory.csv, chrome_browserhistory.csv, and firefox_browerhistory.csv.>>>bh.write_browserhistory_csv()# Create csv files that contain broswer historyThe Description of browserhistoryNAME

    browserhistory

FUNCTIONS

    get_browserhistory() -> dict
        Get the user's browser history by using sqlite3 module to connect to the dabase.
        It returns a dictionary: its key is a name of browser in str and its value is a list of
        tuples, each tuple contains four elements, including url, title, and visited_time. 

    get_database_paths() -> dict
        Get paths to the database of browsers and store them in a dictionary.
        It returns a dictionary: its key is the name of browser in str and its value is the path to database in str.

    get_username() -> str
        Get username based on their local computers

    write_browserhistory_csv() -> None
        It writes csv files that contain the browser history in
        the current working directory. It will writes csv files base on 
        the name of browsers the program detects.Issue ReportIf you have any questions or find bugs in the module,please report the issues/questions at the follwing address.https://github.com/kcp18/browserhistory/issues
Package: browser-history
browser-historybrowser-historyis a simple, zero-dependencies, developer-friendly python
package to retrieve (almost) any browser's history on (almost) any platform.FeaturesSupports mostpopular browsers. Seethisfor a full list.Supports all major platforms -Windows, Mac and Linux.Acommand-line tool: simply runbrowser-history --helpfrom your terminal.History: browsing history with exact timestamp and URL.Bookmarks: browser bookmarks with timestamp, URL, title and folder.Lightweight: the entire package is less than 20kB in size and has no dependencies other than python 3.7+.Developer friendly: you can add support for new browsers or add a new feature very easily.Default browser: can automatically determine the default browser on Windows and Linux (browser-history -b default).Fully open source: this project is developed and maintained by thebrowser-historyorganization(previously maintained byPESOS) and will always be open source (with the Apache 2.0 License).Quick StartInstallationTo install the latest release:pip install browser-historyTo install from the master branch (warning: development version. Things could break)pip install git+https://github.com/browser-history/browser-history.gitUsageHistoryTo get history from all installed browsers:frombrowser_historyimportget_historyoutputs=get_history()# his is a list of (datetime.datetime, url) tupleshis=outputs.historiesIf you want history from a specific browser:frombrowser_history.browsersimportFirefoxf=Firefox()outputs=f.fetch_history()# his is a list of (datetime.datetime, url) tupleshis=outputs.historiesFirefoxin the above snippet can be replaced with any of thesupported browsers.BookmarksWARNING: Experimental feature. Although this has been confirmed to work on multiple (Firefox and Chromium based) browsers
on all platforms, it is not covered by tests and has not been used as much as the history feature.To get bookmarks from all installed browsers:frombrowser_historyimportget_bookmarksoutputs=get_bookmarks()# bms is a list of (datetime.datetime, url, title, folder) tuplesbms=outputs.bookmarksTo get bookmarks from a specific browser:frombrowser_history.browsersimportFirefoxf=Firefox()outputs=f.fetch_bookmarks()# bms is a list of (datetime.datetime, url, title, folder) tuplesbms=outputs.bookmarksCheck out thedocumentationfor more details.Supported BrowsersRead thedocumentationCreditsLogo designed with :heart: byXA.LicenseLicensed under theApache License, Version 2.0 (the "License")
Package: browser-hz
BrowserBackgroundThis project was initiated with the aim of comprehending the fundamental workings of Python packages, their
distribution, and the process of releasing them using the project and dependency management tool, Poetry.
The package was developed for internal utilization across various Python projects such
asbrowser-network-interception.
Its primary objective is to facilitate an in-depth understanding of package management while serving as a valuable asset
for diverse Python projects.How to build projectRequirements:Python ^3.11Poetry ^1.5.1Working with terminalInstallasdfwith required plugins.> brew install asdf
 > asdf plugin-add python
 > asdf plugin-add poetry
 > asdf installConfigurationConfiguration is designed in a way to be controlled by environment variables.[BROWSER]Default:Browser:Chrome (without headless)Supported browsers:CHROMECHROME_HEADLESSCHROME_IN_DOCKER[NOT READY YET]