Skip to content

Commit c992c5b

Browse files
committed
url normalization: strip utm_source
1 parent c03ca25 commit c992c5b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

miscsrc/tk-bbbike-grep

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,9 @@ sub url_normalizations {
416416
$url =~ s{(https://www.nd-aktuell.de/artikel/\d+\.).*}{$1};
417417
$url =~ s{(https://www.tagesspiegel.de/.*)\?.*}{$1};
418418
$url =~ s{(https://www.berlin.de/.*)\?ts=\d+\b}{$1};
419+
# should be last
420+
$url =~ s{([&?])utm_source=.*?(?=&|$)}{$1 eq '?' ? '?' : ''}e;
421+
$url =~ s{\?$}{};
419422
$url;
420423
}
421424

0 commit comments

Comments
 (0)