Btime Framework
Project description
1° - Instale a lib: pip install Btime_framework
2° - Exemplos de inicio (copia e modifica no seu código):
import btime_framework as BT
from btime_framework import By # Opcional
class Framework:
def __init__(self):
self.sys = BT.System() # Classe para opções que envolvem sistema (pdf, janelas, arquivos...)
self.instance = BT.Instancedriver(Browser="Chrome") # Essa é a instância do navegador, classe mestre
self.options = self.instance.initialize_options()
self.driver = None
self.EL= None
def inicialize_driver(self):
# Caso queria adicionar argumentos especÃficos (antes de iniciar o driver)
self.instance.arguments.add_new_argument('--disable-blink-features=AutomationControlled')
# self.instance.arguments.add_new_argument
# O driver já vem com argumentos padrões para evitar detecções e bugs
self.driver = self.instance.initialize_driver(maximize=True)
# Essa é a classe que agrupa todas as formas de detecção de elementos
self.EL = self.instance.elements
class Scrapping_or_another_application(Framework):
def __init__(self):
super().__init__()
self.inicialize_driver()
def run(self):
self.driver.get('https://www.google.com/')
self.EL.find_element_with_wait(By.ID, 'APjFqb').send_keys('Example')
self.EL.find_element_with_wait(By.XPATH, '//div[*[1][self::center]]//input[@value="Estou com sorte"]').click()
# ...
if __name__ == "__main__":
bot = Scrapping_or_another_application()
bot.run()
3° - O framework usa diversas libs e importa dinamicamente, para importar as libs basta usar os comandos abaixo:
CMD
- cd C:\Users\SeuUsuario\Documents\SeuProjeto
- bt -fi SeuArquivo.py
Nisso ele vai te retornar todos os imports que você precisa
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file btime_framework-0.1.4.tar.gz.
File metadata
- Download URL: btime_framework-0.1.4.tar.gz
- Upload date:
- Size: 28.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c169666967313c37cef93186d4088dc49899dce7357c9732b891d43dadfc8aa
|
|
| MD5 |
606debb332ad390b4e18bea8e3812082
|
|
| BLAKE2b-256 |
1fe57d1bec113187d79cc3bd70f46512d0a58b3a7469342c7fb14931878ffee1
|
File details
Details for the file btime_framework-0.1.4-py3-none-any.whl.
File metadata
- Download URL: btime_framework-0.1.4-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ddc5666e4488b93cdc9278a0564774dce3fcf0cbc47564338ebec8e691c9c8a
|
|
| MD5 |
d483d12e62220a3dd1f5a2e4d79c0d0b
|
|
| BLAKE2b-256 |
e6c7754f6365c0073902924b87d8d668536bbedf988960feded2ad1b02924d95
|