Hi all, trying to learn how to scrape websites and i’ve tasked myself with trying to get the output from yr.no weather and report the clear nights for my astronomy.
I have the basics working but i am stuck on how to write a value template that accommodates for reading a heading value when the values change.
to explain in detail, i want to read the “cloud cover %” value, but some times this is in the 5th position and it could be in the 9 & 10th position from the end depending if the other values are single digit or double digit outputs.
If someone has an idea on a means to extract what I’m after i’d appreciate it
Edit your post to mark up the code properly as it is difficult to read without the proper indentation etc.
Why would the order or number of table cells change with the number of digits used for the various values? Kind of difficult to understand if you cannot provide sample data of this page to properly show the differences in expected inputs.
Yes, but that is only one instance of sample data. Again from your first post:
I don’t understand why the number of digits used anywhere in the tables would throw off the order of which column or row you’re looking for, hence the necessity for seeing how the data may or may not change…