@@ -15,6 +15,10 @@ def get_chatgpt_chatinfo(profile: BrowserProfileProtocol, log_func: LogFunction,
15
15
results = []
16
16
17
17
for cache_rec in profile .iterate_cache (url = CONVERSATION_API_URL_PATTERN ):
18
+ if cache_rec .data is None :
19
+ log_func (f"Error: ChatGPT chat information cache file is size is zero! Skipping file." )
20
+ continue
21
+
18
22
cache_data = json .loads (cache_rec .data .decode ("utf-8" ))
19
23
20
24
items = cache_data .get ("items" , {})
@@ -58,13 +62,21 @@ def get_chatgpt_userinfo(profile: BrowserProfileProtocol, log_func: LogFunction,
58
62
results = []
59
63
60
64
for cache_rec in profile .iterate_cache (url = USER_DETAILS_API_URL_PATTERN ):
65
+ if cache_rec .data is None :
66
+ log_func (f"Error: ChatGPT user information cache file is size is zero! Skipping file." )
67
+ continue
68
+
61
69
cache_data = json .loads (cache_rec .data .decode ("utf-8" ))
62
70
63
71
name = cache_data .get ("name" )
64
72
email = cache_data .get ("email" )
65
73
phone_number = cache_data .get ("phone_number" )
66
74
created = cache_data .get ("created" )
67
- standard_timestamp = datetime .fromtimestamp (created )
75
+
76
+ if created is None :
77
+ standard_timestamp = None
78
+ else :
79
+ standard_timestamp = datetime .fromtimestamp (created )
68
80
69
81
result = {
70
82
"Created" : str (standard_timestamp ),
@@ -85,15 +97,15 @@ def get_chatgpt_userinfo(profile: BrowserProfileProtocol, log_func: LogFunction,
85
97
"ChatGPT" ,
86
98
"ChatGPT Chat Information" ,
87
99
"Recovers ChatGPT chat information from History and Cache" ,
88
- "0.1 " ,
100
+ "0.2 " ,
89
101
get_chatgpt_chatinfo ,
90
102
ReportPresentation .table
91
103
),
92
104
ArtifactSpec (
93
105
"ChatGPT" ,
94
106
"ChatGPT User Information" ,
95
107
"Recovers ChatGPT user information from Cache" ,
96
- "0.1 " ,
108
+ "0.2 " ,
97
109
get_chatgpt_userinfo ,
98
110
ReportPresentation .table
99
111
),
0 commit comments