mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-30 01:37:17 +00:00
chg: [importer url_extract] fix item id
This commit is contained in:
parent
3d4131a193
commit
eddeb0b3b0
1 changed files with 4 additions and 1 deletions
|
@ -32,7 +32,10 @@ class Ail_feeder_twitter(Default_json):
|
|||
# use twitter timestamp ?
|
||||
item_date = datetime.date.today().strftime("%Y/%m/%d")
|
||||
item_id = str(self.json_item['meta']['twitter:url-extracted'])
|
||||
item_id = '{}{}.gz'.format(file_name_paste[:215], str(uuid.uuid4()))
|
||||
if len(item_id) > 215:
|
||||
item_id = '{}{}.gz'.format(item_id[:215], str(uuid.uuid4()))
|
||||
else:
|
||||
item_id = '{}{}.gz'.format(item_id, str(uuid.uuid4()))
|
||||
return os.path.join('urlextract', item_date, item_id) + '.gz'
|
||||
|
||||
# # TODO:
|
||||
|
|
Loading…
Reference in a new issue