From 611e61c1e983e266c0995a95f5342b697dbd091e Mon Sep 17 00:00:00 2001 From: Sergiotarxz Date: Tue, 7 May 2024 00:42:18 +0200 Subject: [PATCH] Fixing gender losing of offered pokemon requires database deletion; --- lib/GTSRSSApi.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/GTSRSSApi.pm b/lib/GTSRSSApi.pm index 2402ef4..f40bf93 100644 --- a/lib/GTSRSSApi.pm +++ b/lib/GTSRSSApi.pm @@ -4,7 +4,6 @@ use v5.34.1; use strict; use warnings; -use utf8; use Mojo::Base 'Mojolicious', -signatures; use Mojo::JSON; @@ -143,11 +142,10 @@ EOF my $level_container = $offer->at('.pfFormValue.colPortrait li.portrait')->next; - # my $level_string = decode( 'utf-8', $level_container->text ); - my $level_string = $level_container->text; + my $level_string = decode( 'utf-8', $level_container->text ); my ($level) = $level_string =~ /(\d+)/; - my ($gender) = $level_string =~ /(♂|♀)/; + my ($gender) = $level_string =~ /(♂|♀)/um; my $has_pokerus = $offer->at('span.pkrs'); $has_pokerus = !!$has_pokerus; my $date;