Skip to main content

No project description provided

Project description

Description

Python library writed by Blues Liu.

Install

// first installation 
pip install blues-lib==1.1.1

// upgrade to the newest version
pip install --upgrade blues-lib

sele

BluesDebugChrome

reliant env variables
  1. $env:CHROME_EXE : the chrome's .exe file path - * required
  • such as C:\Users\creep\AppData\Local\Google\Chrome\Application\chrome.exe
  1. $env:CHROME_DRIVER_EXE : the chromedriver's .exe file path - * recommended
  • such as D:\devsoftware\Python38\webdriver\chrome\128.0.6613.86\chromedriver.exe
  1. $env.LOGINER_EXECUTOR : the loginer program path
  • dated setting: D:\devapp\seleniumapp\loginer\Starter.py
input
config = {
  'url':'http://deepbluenet.com',
}
arguments = {
  '--user-data-dir':'"c:/sele/test3"',
  '--remote-debugging-address':'localhost:8003',
}

util

from blues_lib.util.BluesFiler import BluesFiler

print(BluesFiler.exists('dir'))

set/get env variables

// set
[Environment]::SetEnvironmentVariable('LOGINER_EXECUTOR', 'D:\devapp\seleniumapp\loginer\Starter.py','machine')
// get
[Environment]::GetEnvironmentVariable('LOGINER_EXECUTOR','machine')

QA

Selenium Wire CA error

ERROR:cert_verify_proc_builtin.cc(766)] CertVerifyProcBuiltin for at.alicdn.com failed:
----- Certificate i=1 (CN=Selenium Wire CA) -----

Resolve:

  1. download ca.crt from selenium-wire library
https://github.com/wkeeling/selenium-wire/blob/master/seleniumwire/ca.crt

Execute by powershell scheduled task

task

unRegister-ScheduledTask -TaskName 'naps'
Get-ScheduledTask -TaskName 'naps'
Start-ScheduledTask -TaskName 'naps'
Get-ScheduledTaskInfo -TaskName 'naps'
enable-ScheduledTask -TaskName 'naps'
disable-ScheduledTask -TaskName 'naps'

develop

$arg='-NoProfile -command "& {set-location -path D:\devapp\pyapp\blues-lib-py\test\naps; python .\NAPSTest.py}"' ;  $action = New-ScheduledTaskAction -Execute 'powershell.exe' -Argument $arg ; $now = Get-Date ; $interval = New-TimeSpan -Hours 2; $trigger = New-ScheduledTaskTrigger -Once -RepetitionInterval $interval -At $now ; Register-ScheduledTask -Action $action  -Trigger $trigger -TaskName 'naps' 

exe

$chrome="'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'" ; $arg='-NoProfile -command "& { set-location -path D:\datacross\dist\App; .\App.exe '+$chrome+' }"' ;  $action = New-ScheduledTaskAction -Execute 'powershell.exe' -Argument $arg ; $now = Get-Date ; $interval = New-TimeSpan -Hours 1; $trigger = New-ScheduledTaskTrigger -Once -RepetitionInterval $interval -At $now ; Register-ScheduledTask -Action $action  -Trigger $trigger -TaskName 'datacross' 

install

This develop pc will push pip to officail reigstry ,can't set the mirros

pip install -i https://mirrors.aliyun.com/pypi/simple selenium
pip install -i https://mirrors.aliyun.com/pypi/simple --upgrade selenium

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blues_lib-1.2.11.tar.gz (99.7 kB view details)

Uploaded Source

Built Distribution

blues_lib-1.2.11-py3-none-any.whl (201.9 kB view details)

Uploaded Python 3

File details

Details for the file blues_lib-1.2.11.tar.gz.

File metadata

  • Download URL: blues_lib-1.2.11.tar.gz
  • Upload date:
  • Size: 99.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.5

File hashes

Hashes for blues_lib-1.2.11.tar.gz
Algorithm Hash digest
SHA256 2ac5131bf1c6be27696b68cf85cacb1516d8d4855918ba47a61e19ae104d9194
MD5 ab9d4762425a4479aabdd34b60b794c2
BLAKE2b-256 9f0ed6b031e699f9face4a1e254b452c3a251685718bffc675ec50b9e183941d

See more details on using hashes here.

File details

Details for the file blues_lib-1.2.11-py3-none-any.whl.

File metadata

  • Download URL: blues_lib-1.2.11-py3-none-any.whl
  • Upload date:
  • Size: 201.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.5

File hashes

Hashes for blues_lib-1.2.11-py3-none-any.whl
Algorithm Hash digest
SHA256 728efe85da3271a15025028f8121edb7cf1ab872d05e07175c77b647d5103aba
MD5 6bc16258bed446a67be217ac801826d0
BLAKE2b-256 1ba7e81608f4b62df5bb49987f33d8f7451d9657dae7090389ded63426991833

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page