more useful options | |
PerlMonks |
Re^4: polishing up a json fetching script for weather databy Aldebaran (Curate) |
on May 27, 2020 at 08:32 UTC ( [id://11117323]=note: print w/replies, xml ) | Need Help?? |
I don't understand the reason behind the various approaches rather than keep things clean and just sticking with the Mojo based solution for everything.
The approaches I was using are ones I understand. First with WWW::Mechanize, which I've used on that site for years. I haven't worked up the facility to do it with Mojo yet, despite many attempts. What happens is that I try to extend the script in a small way and can't quite get there. You said if I ran into the weeds again, let you know, so let's try this one, because it's where I was/am stuck with mojo. I'm trying to enter the site at the beginning and mechanize my way through to the table I need after the initial sky map has been made. I tried commands like this to tell me something about the page:
I see 2 of the fields I need to populate here, but I don't know how to deal with the button in the mojo context. In your successful upthread script, you seem not to use a click_button event to get it done, so I tried to squeak by the same way:
Q1) How do I lose this one? (I'd like to see the equivalent of $mech->uri) If I need the button it would have to look something like submit_button: %= submit_button 'Ok!', id => 'foo'Q2) What gives with the %= symbol on the left? I thought there would be a better, local way to get whatever data you are looking for, but I'm not an astronomer.I took Stellar Evolution my final semester in physics. I was doing alright until the final turned out to be a computer project that was to integrate a star given a certain composition (no idea what syntax). I was caught completely flatfooted and had somewhat of a meltdown, where I decided to continue my degree with mathematics instead. The failure has stung through the decades. If Astro::Coord::ECI::Sun does this then I don't see any problem in just calling that as many times as you require.Copy that.
In Section
Seekers of Perl Wisdom
|
|