def __init__(self, user_id: str): self.image_height = config.THUMBNAIL_SIZE.HEIGHT self.image_width = config.THUMBNAIL_SIZE.WIDTH # process label self.label_set = '01' self.label_set_len = len(self.label_set) self.label_len = 1 self.label_size = self.label_set_len * self.label_len self.X = tf.compat.v1.placeholder(tf.float32, [None, HEIGHT * WIDTH]) # 特征向量 self.Y = tf.compat.v1.placeholder(tf.float32, [None, self.label_size]) # 标签 self.keep_prob = tf.compat.v1.placeholder(tf.float32) # dropout值 self.user_id = user_id self.stash = Stash('thumbnail_process') self.model_save_dir = self.pre_path( Path('model_save_dir', self.user_id)) self.model_name = self.model_save_dir + '/atv' self.model_log_dir = self.pre_path('model_logs', build=False) self.train_images_list = self.stash['train_data'] self.verify_images_list = self.stash['test_data'] self.log = AutoLog.file_log('model')
def __init__(self, user_id: str): super().__init__(user_id) self.TRAIN_PATH = self.pre_path('train_data') self.TEST_PATH = self.pre_path('test_data') self.VALID_PATH = self.pre_path('valid_data') self.log = AutoLog.file_log('thumbnail_process') self.resize_width = config.THUMBNAIL_SIZE.WIDTH self.resize_height = config.THUMBNAIL_SIZE.HEIGHT self.stash = Stash('thumbnail_process') self.label_info = None
def __init__(self, bj_id: str): super().__init__() self.bj_id = bj_id self.stash = Stash(f'afreecatv_{self.bj_id}') # public url self.INFO_URL = 'http://afbbs.afreecatv.com:8080/api/video/get_video_info.php' self.THUMBNAIL_URL = 'http://videoimg.afreecatv.com/php/SnapshotLoad.php' self.VOD_URL_FORMAT = 'http://bjapi.afreecatv.com/api/%s/vods?page={page}' \ '&per_page=20&orderby=reg_date' % (self.bj_id,) self.USER_VOD_FORMAT = 'http://bjapi.afreecatv.com/api/%s/vods/user?page={page}' \ '&orderby=reg_date' % (self.bj_id,) self.STATION_URL = 'http://vod.afreecatv.com/PLAYER/STATION/{station_num}' # path self.STATION_PATH = str( Path(config.PROJECT_PATH, f'afreecatv_vod_thumbnail/{self.bj_id}')) # thumbnail 参数 self.thumbnailDuration = config.THUMBNAIL_SIZE.DURATION_SEC self.rowCount = config.THUMBNAIL_SIZE.ROW_COUNT self.columnCount = config.THUMBNAIL_SIZE.COLUMN_COUNT self.log = AutoLog.file_log('spider_thumbnail')
def __init__(self, bj_id: str): super().__init__() self.bj_id = bj_id self.stash = Stash(f'afreecatv_{self.bj_id}') self.log = AutoLog.file_log('spider_view_cnt') self.VIEW_CNT_URL = 'https://apisabana.afreecatv.com/service/vod_star2_stats.php' self.post_data = { 'szAction': 'view', 'nDeviceType': 1, 'nTitleNo': None, 'szLang': 'zh_CN', 'nStationNo': None, 'nBbsNo': None, 'szType': 'bj', 'szModule': 'BjViewCnt', 'szSysType': 'html5', 'szLoginId': self.account_id, 'nIdx': 1, } self.perfect_start_min = 5 self.smooth_factor = 2 self.range_factor = 4
def __init__(self, bj_id: str): self.bj_id = bj_id self.stash = Stash(f'afreecatv_{self.bj_id}') self.log = AutoLog.file_log('m3u8_merge') self.VOD_PATH = self.pre_path('vod')