Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#10231 closed Patch - Bug Fix (fixed)

yrnoxml.pl won't show list of cities during adding new location

Reported by: j.novak@… Owned by: beirdo
Priority: minor Milestone:
Component: Plugin - MythWeather Version: 0.24.1
Severity: medium Keywords:
Cc: Ticket locked: no

Description

yrnoxml.pl won't show list of cities during adding new location. The reason is that yr.no changed format of page which script parsed. You can check it with ./yrnoxml.pl -l liberec - It won't return any location.

I found that there is no way how to update script to parse homepage correctly, so I updated script to use JSON API at yr.no to find cities as yr.no home page does.

It adds dependency on JSON perl module.

Note: During work on code I found that code uses -D parameter for debugging, but command line parser don't accept it. I updated it too.

Attachments (1)

yrnoxml.pl.diff (3.1 KB) - added by j.novak@… 7 years ago.
Patch to yrnoxml.pl

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by j.novak@…

Attachment: yrnoxml.pl.diff added

Patch to yrnoxml.pl

comment:1 Changed 7 years ago by Github

Milestone: unknown0.25
Resolution: fixed
Status: newclosed

Fix yrnoxml weather script

Seems yr.no has changed their site around a bit, in particular the searching. This now should work properly again.

Fixes #10231.

Based on the patch in the ticket, from j.novak@… but reformatted and reworked a bit.

Branch: master Changeset: 75bde2a1bea691c9b1374f2378ecb60bad1d79e7

comment:2 Changed 7 years ago by beirdo

Milestone: 0.250.24.2

Also backported to fixes-0.24

comment:3 Changed 7 years ago by stuartm

Milestone: 0.24.2

Milestone 0.24.2 deleted

Note: See TracTickets for help on using tickets.