You are here

urldate different local showing english only

24 posts / 0 new
Last post
msallal
Offline
Donator
Joined: 3 years
Last seen: 1 year
urldate different local showing english only

this was working on previous version 3.x.x
but on the new version is not working with different local
for ex. i have ini have date in arabic

urldate.format {datestring(debug)|ddd/dd/MMM/yyyy|ar-AE}
today_in_qatar.modify{calculate(debug timezone=Asia/Qatar)|'urldate'}
index_variable_element.modify{calculate(debug format=date,dddd#dd#MMM)|'today_in_qatar'}

this supposed to show the date in different local like this الجمعة ١٥ سبتمبر
while it just show the date in english only Friday 15 Sep

please advice
thanks

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 4 min

not sure what your trying to acomplish.
today_in_qatar is not a valid element name.

on the site {xxx} line why dont you set timezone=Asia/Qatar and cultureinfo=ar-AE
and use
urldate.format {datestring|dddd#dd#MMM}

result..

[ Debug ] url_index created:
[ Debug ] https://ttest.com?date=الجمعة#15#سبتمبر

msallal
Offline
Donator
Joined: 3 years
Last seen: 1 year

please check my current ini and log attached
I already set the timezone=Asia/Qatar and cultureinfo=ar-AE

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 4 min

you can just use the index_date to force a different start day from other than today(default)
see file and log

when you run it you probably wont see the rusults in your log,i can see it because i have a developer license which has this enabled.

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 4 min

btw i didnt fix your showsplit but this is all you need

index_showsplit.scrub {regex||<p>\d{2}:\d{2}[^<]*</p>||}

msallal
Offline
Donator
Joined: 3 years
Last seen: 1 year

in this it works fine because there is no filtration on today date, the idea of this site, there is no way to match the date because it is combination of different dates representation like this الجمعة 15 سبتمبر/ أيلول 2023 – 30 صفر 1445

so in order to find it, I with Matt ended with a solution to look for the first part that match today only so instead of this الجمعة 15 سبتمبر/ أيلول 2023 – 30 صفر 1445 we will look only at this الجمعة 15 سبتمبر
and from there the scrub will start

this used to work fine on previous versions, I updated to latest version few days ago and since then it is not working, I got my debug license today and found out when I debug index_variable_element.modify{calculate(debug format=date,dddd#dd#MMM)|'global_temp_1'}
it shows Friday 15 Sep instead of لجمعة 15 سبتمبر

msallal
Offline
Donator
Joined: 3 years
Last seen: 1 year

in this it works fine because there is no filtration on today date, the idea of this site, there is no way to match the date because it is combination of different dates representation like this الجمعة 15 سبتمبر/ أيلول 2023 – 30 صفر 1445

so in order to find it, I with Matt ended with a solution to look for the first part that match today only so instead of this الجمعة 15 سبتمبر/ أيلول 2023 – 30 صفر 1445 we will look only at this الجمعة 15 سبتمبر
and from there the scrub will start

this used to work fine on previous versions, I updated to latest version few days ago and since then it is not working, I got my debug license today and found out when I debug index_variable_element.modify{calculate(debug format=date,dddd#dd#MMM)|'global_temp_1'}
it shows Friday 15 Sep instead of لجمعة 15 سبتمبر

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 4 min

index_date element is used just for this purpose,look at the guide.xml and updated file,see anything wrong?

ur trying to do this the hard way with what your doing.

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 4 min

sorry i wasnt paying attention when i changed the showsplit
the regex should be this..

||<p>\d{1,2}:\d{1,2}[^<]*</p>||

msallal
Offline
Donator
Joined: 3 years
Last seen: 1 year

this way it will miss with the date and will start from the first, this site is not updating daily, it pushes the update form almost a week, and my tool run daily, so each day will start from the beginning, see the attachment what it has to bring is the right side not left side.
the only way is to start the scrub exactly at today date where we can match the arabic date there

and just to mention, this way was working fine for almost two years now until recently I updated to latest version

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 4 min

files updated in above post.
far as the update goes it wont affect anything if the schedule does not change,webgrab will just show no changes when it runs daily.when it does change the new shows will be added.

msallal
Offline
Donator
Joined: 3 years
Last seen: 1 year

is there a way we can have alive chat or call?

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 4 min

example

when first run with no previous epg data

[ Info ] Summary for update of Doc Aljeerza
[ Info ] missing shows added 0
[ Info ] changed shows updated 0
[ Info ] new shows added 45
[ Info ] unchanged shows inspected 0
[ Info ] total after update 45

second run in incrimental update mode

[ Info ] Summary for update of Doc Aljeerza
[ Info ] no changes, no update necessary !
[ Info ] unchanged shows inspected 45
[ Info ] total after update 45

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 4 min

download the ini again and tell whats wrong with the resulting epg?

msallal
Offline
Donator
Joined: 3 years
Last seen: 1 year

OK, I think this is better version
so by adding this it will force the date to filter based on today date
index_date.scrub {single(debug force separator="/" include=first)|||<|}

Am I correct,

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 4 min

it forces webgrab to start on the day of the first show,right now it skips all thr shows from the 13th and 14th
your log will show this

msallal
Offline
Donator
Joined: 3 years
Last seen: 1 year

exactly, this is cleaner and better version than before
I will keep an eye on this

Thank you so much

msallal
Offline
Donator
Joined: 3 years
Last seen: 1 year

any idea why this script is not working n docker, it works fine on windows but in docker I have this error

[Error ] Unable to channel Al Jazeera Documentary Final
[Critical] Generic syntax exception:
[Critical] message:
[Error ] Current culture: en-GB
[Error ] time parsing error : The string 'الأربعاء 13 سبتمبر' was not recognized as a valid DateTime. There is an unknown word starting at index '0'.
[Error ] index_date time scrubbed : الأربعاء 13 سبتمبر
[Error ] computer date/time format: 16/09/2023 13:55:44
[ Info ] Existing guide data restored!

please check the attached log

Attachments: 
mat8861
Offline
WG++ Team memberDonator
Joined: 9 years
Last seen: 2 days

you need to install locale for that culture

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 4 min

you can try adding pattern to the index_date.scrub line.webgrab doesnt reconize the date format.
its weird though dockers having this issue,i have ubuntu and fedora linux setups and both work fine without this.

index_date.scrub {single(force pattern="dddd dd MMMM" separator="/" include=first)|<h3>||</h3>|</h3>}

edit: matt8861 got it figured out.

you slould also remove the debug argument from the index_date line(unless u have it there to troubleshoot the problem).adds unneeded clutter to your log file.

msallal
Offline
Donator
Joined: 3 years
Last seen: 1 year

how to do this, any link?

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 4 min
msallal
Offline
Donator
Joined: 3 years
Last seen: 1 year

this does not work on latest docker version, I switched back to V3.2.2 and works fine

msallal
Offline
Donator
Joined: 3 years
Last seen: 1 year

this works with me for Alpine image
apk add icu-dev icu-libs icu-data-full

REFERENCE:
https://github.com/dotnet/dotnet-docker/issues/3844

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl