![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
BotWeb é uma ferramenta poderosa para automação de operações web, combinando as bibliotecas Selenium e Requests. Este projeto foi projetado para simplificar tarefas como scraping de dados, interações em sites e testes automatizados.
Para instalar o pacote, execute:
pip install botweb
from botweb import BotWeb
class MyBot(BotWeb):
def __init__(self, *args, **kwargs):
super().__init__(
# The prefix name to be concatenated with the credentials_keys
# eg. WEB_SYSTEM_USERNAME, WEB_SYSTEM_PASSWORD
# these variables will be setted as environment variables
# with the values asked from the terminal.
# To prevent of every run ask the credentials from the terminal
# restart the IDE after provide the credentials values
prefix_env="WEB_SYSTEM",
credentials_keys=["USERNAME", "PASSWORD"]
)
def login(self):
"""My login logic here! (Abstract method needs to be implemented)"""
# self._enter_username(self.credentials['USERNAME'])
# self._enter_password(self.credentials['PASSWORD'])
# self._submit()
# This method sets the cookies into the self.session: requests.Session
# It enable making requests inside the system
# see the post_example() method bellow
self.get_cookies()
def post_example(self):
# The headers inspected from the network request
headers = {
"accept": "application/json, text/plain, */*",
"accept-language": "pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7",
"authorization": "",
"content-type": "application/json;charset=UTF-8",
}
# If the system store the token in the local storage it would work,
# else override it with your own logic to get the token authorization
headers.update({
"authorization": self.get_token_authorization_from_storage()
})
# The payload inspected from the network request
body = 'a=something&b=anotherthing'
response = self.session.post(
"https://example.com.br",
headers=headers,
data=body,
)
if response.status_code == 200:
print(response.json())
if __name__ == '__main__':
with MyBot() as mybot:
mybot.init_browser(headless=False, browser="firefox")
mybot.open(
"https://github.com/login"
)
mybot.login()
# mybot.post_example()
input("Digite algo para continuar...")
Contribuições são bem-vindas! Para contribuir:
git checkout -b minha-funcionalidade
git commit -m "Adiciona nova funcionalidade"
Este projeto está licenciado sob a Licença MIT.
Para mais informações ou suporte, visite o repositório no GitHub.
FAQs
Class to perform web selenium and requests operations on web systems
We found that botweb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.