Skip to content

Commit

Permalink
Fix Crunchyroll Detection
Browse files Browse the repository at this point in the history
  • Loading branch information
アナスタシア committed Aug 20, 2016
1 parent 1488cd4 commit c49467d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions detectstream/MediaStreamParse.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ +(NSArray *)parse:(NSArray *)pages{
//Perform Sanitation
regextitle = [ez searchreplace:regextitle pattern:@"Crunchyroll - Watch\\s"];
regextitle = [ez searchreplace:regextitle pattern:@"\\s-\\sMovie\\s-\\sMovie"];
regextitle = [ez searchreplace:regextitle pattern:@"\\sEpisode"];
regextitle = [ez searchreplace:regextitle pattern:@"\\D-\\s*.*$"];
tmpepisode = [ez findMatch:regextitle pattern:@"(\\d+)" rangeatindex:0];
title = [ez findMatch:regextitle pattern:@"\\b.*\\D" rangeatindex:0];
tmpepisode = [ez findMatch:regextitle pattern:@"\\sEpisode (\\d+)" rangeatindex:0];
regextitle = [regextitle stringByReplacingOccurrencesOfString:tmpepisode withString:@""];
tmpepisode = [ez searchreplace:tmpepisode pattern:@"\\sEpisode"];
regextitle = [ez searchreplace:regextitle pattern:@"\\s-\\s*.*"];
title = regextitle;
}
else
continue;
Expand Down Expand Up @@ -111,6 +112,7 @@ +(NSArray *)parse:(NSArray *)pages{
title = [ez findMatch:[NSString stringWithFormat:@"%@", DOM] pattern:@"<div class=\"heading\">\\s+<h2>*.*<br/>" rangeatindex:0];
title = [ez searchreplace:title pattern:@"<div class=\"heading\">\\s+<h2>"];
title = [title stringByReplacingOccurrencesOfString:@"<br/>" withString:@""];
title = [ez searchreplace:title pattern:@"\\s-\\s*.*"];
}
else
continue; // Invalid address
Expand Down

0 comments on commit c49467d

Please sign in to comment.