Refactor cookie handling and service structure

- Removed the old CookieResult model from pyfragment.core.models and created a new one in pyfragment.services.cookies.models.
- Implemented get_cookies_from_browser function in pyfragment.services.cookies.service to extract cookies directly from supported browsers.
- Updated imports across various modules to reflect the new structure and removed unused imports.
- Cleaned up models in ads, anonymous_numbers, giveaways, marketplace, and purchases domains by removing unnecessary __all__ declarations.
- Added new example scripts for cookie extraction and various purchase functionalities.
- Consolidated constants into a new pyfragment.core.constants module for better organization.
This commit is contained in:
bohd4nx
2026-06-16 01:19:33 +03:00
parent 9f11ccb3ee
commit dc9661134d
51 changed files with 178 additions and 234 deletions
+2 -2
View File
@@ -10,9 +10,9 @@ from tonutils.contracts.jetton import get_wallet_address_get_method, get_wallet_
from tonutils.exceptions import ProviderResponseError
from pyfragment.core.constants import MIN_GRAM_BALANCE, MIN_USDT_BALANCE, USDT_GRAM_MASTER_ADDRESS
from pyfragment.exceptions import WalletError
from pyfragment.enums import WALLET_CLASSES
from pyfragment.domains.tonapi.models import WalletInfo
from pyfragment.enums import WALLET_CLASSES
from pyfragment.exceptions import WalletError
if TYPE_CHECKING:
from pyfragment.client import FragmentClient