maxbbraun / mirror

Smart Mirror
https://medium.com/@maxbraun/my-bathroom-mirror-is-smarter-than-yours-94b21c6671ba#.81sljnn80
MIT License
578 stars 136 forks source link

News #22

Open parsons-owen opened 6 years ago

parsons-owen commented 6 years ago

Hi, so i have been playing with different news feeds and i have realised the included one has 3 elements feed>entry>title

however, most rss feeds use this layout: rss>channel>item>title

at the moment i can only us the verge as a source as it works but i want to use BBC or Sky news (http://feeds.skynews.com/feeds/rss/uk.xml) which uses the 2nd layout. if i could get it to read through one extra line then it would be perfect! but i cant, i've tried a few different things but haven't managed to get it to work. i would really appreciate it if you could show me how? im new to this!

thanks!

tempdj commented 6 years ago

Managed to get the BBC feed working using "http://feeds.bbci.co.uk/news/rss.xml"

parsons-owen commented 6 years ago

How did you manage that!? I've been trying for so long I've been stuck with the verge 😂😂.

tempdj commented 6 years ago

Hopefully we are are going on about the same thing, but I just inputted that URL under the Java folder down to News.java and in there I found: Private static final String NEWS_RSS_URL = "http://feeds.bbci.co.uk/news/rss.xml"; Changed feed to the above and now I get BBC feeds. Hope this helps. Struggling with the weather bit at the moment

parsons-owen commented 6 years ago

AHH thank you so much! I'll give it a try. Yeah I saw your other post I'm just about to checkout what I've done and I'll send you it

parsons-owen commented 6 years ago

See that doesn't work for me!! Because of the layout of the RSS feeds it can't actually read it cause it does . Only way it would work is if it only had to look through 3 of those not 4 to get to the title. </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/tempdj"><img src="https://avatars.githubusercontent.com/u/40744249?v=4" />tempdj</a> commented <strong> 6 years ago</strong> </div> <div class="markdown-body"> <p>Yeah no worries. Thanks would appreciate that. </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/tempdj"><img src="https://avatars.githubusercontent.com/u/40744249?v=4" />tempdj</a> commented <strong> 6 years ago</strong> </div> <div class="markdown-body"> <p>Thats a pain. So what do you use for your feeds at the minute?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/parsons-owen"><img src="https://avatars.githubusercontent.com/u/39348826?v=4" />parsons-owen</a> commented <strong> 6 years ago</strong> </div> <div class="markdown-body"> <p>Well currently I use the verge because there layout is something like channel > entry > title. See it only has 3 steps if you will to get to the title </p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>