Skip to content

Commit

Permalink
refactor: improve some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiiRepair committed Dec 17, 2023
1 parent 959acfa commit 67664b3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion example/main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
import sys
import time
import shutup
import random
import sys
import asyncio
import schedule
from termcolor import colored
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "quotexpy"
version = "1.40.3+1"
version = "1.40.3+2"
description = "📈 QuotexPy is a library to easily interact with qxbroker."
authors = [
"Santiago Ramirez <santiirepair@gmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion quotexpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def truncate(f, n):


class Quotex(object):
__version__ = "1.40.3+1"
__version__ = "1.40.3+2"

def __init__(self, email, password):
self.size = [
Expand Down
13 changes: 5 additions & 8 deletions quotexpy/ws/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ def on_message(self, wss, message):
elif message.get("error"):
self.logger.error(message)
pass
except Exception as e:
self.logger.error(e)
except Exception:
pass
if "51-" in str(message):
self.api._temp_status = str(message)
Expand All @@ -109,9 +108,7 @@ def on_message(self, wss, message):
elif isinstance(message, list) and len(message[0]) == 4:
ans = {"time": message[0][1], "price": message[0][2]}
self.api.realtime_price[message[0][0]].append(ans)
except Exception as e:
self.logger.error("on_message: ")
self.logger.error(e)
except Exception:
pass
global_value.ssl_Mutual_exclusion = False
self.wss.send('42["tick"]')
Expand All @@ -124,15 +121,15 @@ def on_error(self, wss, error):
global_value.check_websocket_if_error = True

def on_open(self, wss):
"""Method to process websocket open"""
"""Method to process websocket open."""
logger = logging.getLogger(__name__)
logger.debug("Websocket client connected")
logger.info("Websocket client connected.")
global_value.check_websocket_if_connect = 1

def on_close(self, wss, close_status_code, close_msg):
"""Method to process websocket close."""
logger = logging.getLogger(__name__)
logger.debug("Websocket connection closed.")
logger.info("Websocket connection closed.")
global_value.check_websocket_if_connect = 0

def on_ping(self, wss, ping_msg):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

setup_kwargs = {
"name": "quotexpy",
"version": "1.40.3+1",
"version": "1.40.3+2",
"description": "📈 QuotexPy is a library to easily interact with qxbroker.",
"long_description": '<div align="center">\n<img src="https://static.scarf.sh/a.png?x-pxid=cf317fe7-2188-4721-bc01-124bb5d5dbb2" />\n\n## <img src="https://github.com/SantiiRepair/quotexpy/blob/main/.github/images/quotex-logo.png?raw=true" height="56"/>\n\n\n**📈 QuotexPy is a library to easily interact with qxbroker.**\n\n______________________________________________________________________\n\n[![License](https://img.shields.io/badge/License-LGPL--2.1-magenta.svg)](https://www.gnu.org/licenses/gpl-3.0.txt)\n[![PyPI version](https://badge.fury.io/py/quotexpy.svg)](https://badge.fury.io/py/quotexpy)\n![GithubActions](https://github.com/SantiiRepair/quotexpy/actions/workflows/pylint.yml/badge.svg)\n\n</div>\n\n______________________________________________________________________\n\n## Installing\n\n📈 QuotexPy is tested on Ubuntu 18.04 and Windows 10 with **Python >= 3.10, <= 3.12.**\n```bash\npip install quotexpy\n```\n\nIf you plan to code and make changes, clone and install it locally.\n\n```bash\ngit clone https://github.com/SantiiRepair/quotexpy.git\npip install -e .\n```\n\n## Import\n```python\nfrom quotexpy import Quotex\n```\n\n## Examples\nFor examples check out [some](https://github.com/SantiiRepair/quotexpy/blob/main/example/main.py) found in the `example` directory.\n\n## Donations\nIf you feel like showing your love and/or appreciation for this project, then how about shouting us a coffee ;)\n\n[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/SantiiRepair)\n\n## Acknowledgements\n- Thanks to [@cleitonleonel](https://github.com/cleitonleonel) for the initial base implementation of the project 🔥\n- Thanks to [@ricardospinoza](https://github.com/ricardospinoza) for solving the `trade` error in the code 🚀\n\n## Notice \nThis project is a clone of the [original](https://github.com/cleitonleonel/pyquotex) project, because the original project was discontinued, I updated it with the help of [collaborators](https://github.com/SantiiRepair/quotexpy/graphs/contributors) in the community so that it is accessible to everyone.\n',
"author": "Santiago Ramirez",
Expand Down

0 comments on commit 67664b3

Please sign in to comment.