feat(tarnished): remove namespace

This commit is contained in:
QIN2DIM 2023-08-24 18:35:43 +08:00
parent 8713b11706
commit 7213857c8e
5 changed files with 9 additions and 10 deletions

View File

@ -20,7 +20,7 @@ from playwright.sync_api import Page
from services.agents.hcaptcha_solver import is_fall_in_captcha, Radagon
from services.models import EpicPlayer
from utils.toolbox import from_dict_to_model
from utils import from_dict_to_model
# fmt:off
URL_CLAIM = "https://store.epicgames.com/en-US/free-games"

View File

@ -7,6 +7,7 @@ from __future__ import annotations
import abc
import json
import os
import time
from abc import ABC
from contextlib import suppress
@ -95,7 +96,10 @@ class Player(ABC):
"""
def __post_init__(self):
namespace = f"{self.mode}@{self.email.split('@')[0]}"
if not os.getenv("GITHUB_REPOSITORY"):
namespace = f"{self.mode}@{self.email.split('@')[0]}"
else:
namespace = f"{self.mode}"
self.user_data_dir = self.user_data_dir.joinpath(namespace)
for ck in ["browser_context", "record"]:
ckp = self.user_data_dir.joinpath(ck)

View File

@ -10,7 +10,7 @@ from dataclasses import dataclass, field
from pathlib import Path
from typing import List
from utils.toolbox import init_log
from utils import init_log
@dataclass

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Time : 2022/1/16 0:27
# Time : 2023/8/24 18:31
# Author : QIN2DIM
# Github : https://github.com/QIN2DIM
# GitHub : https://github.com/QIN2DIM
# Description:
from __future__ import annotations

View File

@ -1,5 +0,0 @@
# -*- coding: utf-8 -*-
# Time : 2022/1/16 0:25
# Author : QIN2DIM
# Github : https://github.com/QIN2DIM
# Description: