File tree 1 file changed +16
-7
lines changed
GitHubContributionsParserV 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -230,13 +230,22 @@ private Data Parse(string user)
230
230
231
231
try
232
232
{
233
- string data_count = nodeDay . Attributes [ "data-count" ] . Value ;
234
- string data_date = nodeDay . Attributes [ "data-date" ] . Value ;
235
-
236
- day . counter = Int32 . Parse ( data_count ) ;
237
- day . date = DateTime . Parse ( data_date ) ;
238
-
239
- current . calendar . Add ( day ) ;
233
+ if ( nodeDay . Attributes . Contains ( "data-date" ) )
234
+ {
235
+ //string data_count = nodeDay.Attributes["data-count"].Value;
236
+ string data_date = nodeDay . Attributes [ "data-date" ] . Value ;
237
+ string data_count = "0" ;
238
+
239
+ if ( ! nodeDay . InnerText . StartsWith ( "No" ) )
240
+ {
241
+ data_count = nodeDay . InnerText . Split ( ' ' ) [ 0 ] ;
242
+ }
243
+
244
+ day . counter = Int32 . Parse ( data_count ) ;
245
+ day . date = DateTime . Parse ( data_date ) ;
246
+
247
+ current . calendar . Add ( day ) ;
248
+ }
240
249
}
241
250
catch ( Exception ex )
242
251
{
You can’t perform that action at this time.
0 commit comments