• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-News and BBC

Scheduled Pinned Locked Moved Solved Troubleshooting
40 Posts 4 Posters 7.6k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    mumblebaj Module Developer @DarrenHill
    last edited by sdetweil Sep 7, 2022, 7:43 PM Sep 7, 2022, 7:26 PM

    @DarrenHill MMM-NewsAPI has a whole lot more configs. See below sample.

    {
                            module: "MMM-NewsAPI",
                            header: "news",
                           //  disabled: true,
                            position: "bottom_bar",
                            pages: {"sport": "bottom_bar"},
                            config: {
                                    apiKey: <api-key>,
                                    type: "horizontal",
                                    choice: "everything",
                                    pageSize: 20,
                                    sortBy: "publishedAt",
                                    drawInterval: 1000*30,
                                    templateFile: "template.html",
                                    fetchInterval: 1000*60*60,
                                    query: {
                                            country: "",
                                            category: "",
                                            q: "",
                                            qInTitle: "",
                                            sources: "",
                                            domains: "bbc.co.uk",
                                            excludeDomains: "",
                                            language: ""
                                            }
                                    }
    				},

    Check out my modules at: https://github.com/mumblebaj?tab=repositories

    D S 2 Replies Last reply Sep 7, 2022, 7:42 PM Reply Quote 0
    • D Offline
      DarrenHill @mumblebaj
      last edited by DarrenHill Sep 7, 2022, 7:43 PM Sep 7, 2022, 7:42 PM

      @mumblebaj - Thanks for the support, and for both modules.

      Unfortunately that gives me a headline in Spanish (I think) about Apple iPhone 14 with “undefined” below it.

      I also tried your everything example configs from your GH page and got a similar layout (headline and undefined).

      I’m beginning to think NewsAPI itself is screwed for me unfortunately, so we may be onto a loser here regardless of module.

      M 1 Reply Last reply Sep 7, 2022, 7:45 PM Reply Quote 0
      • S Offline
        sdetweil @mumblebaj
        last edited by Sep 7, 2022, 7:44 PM

        @mumblebaj i commented out your disabled: true,

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 1
        • M Offline
          mumblebaj Module Developer @DarrenHill
          last edited by Sep 7, 2022, 7:45 PM

          @DarrenHill That is very weird as the configs seem to work for me and the other guys who have tried to assist thus far.

          Check out my modules at: https://github.com/mumblebaj?tab=repositories

          D S 2 Replies Last reply Sep 7, 2022, 7:48 PM Reply Quote 0
          • D Offline
            DarrenHill @mumblebaj
            last edited by DarrenHill Sep 7, 2022, 7:50 PM Sep 7, 2022, 7:48 PM

            @mumblebaj - Yes, as I said I’m starting to think that your modules are both working fine, but the API feed I’m getting from NewsAPI is somehow corrupted and they are universally having issues with it.

            I can’t create a new API key as it won’t let me (it says they don’t support UK now if you try and create a new key from here), and I guess that might be related somehow?

            4223b88d-2348-4c14-8963-bdfe989b087c-image.png

            So I think we might be at a dead end here unfortunately with anything that’s using that API as its source.

            M S 2 Replies Last reply Sep 8, 2022, 8:05 PM Reply Quote 0
            • M Offline
              mumblebaj Module Developer @DarrenHill
              last edited by Sep 8, 2022, 8:05 PM

              @DarrenHill The data coming through is fine as it works for me with the source that you provided. Not sure why you not able to create an API key though. I just tested creating another API Key and that worked as well. Unfortunately I am not able to assist with getting a key created.

              Check out my modules at: https://github.com/mumblebaj?tab=repositories

              1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @DarrenHill
                last edited by Sep 8, 2022, 8:28 PM

                @DarrenHill see my chat message

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                D 1 Reply Last reply Sep 10, 2022, 10:18 AM Reply Quote 0
                • S Offline
                  sdetweil @mumblebaj
                  last edited by Sep 8, 2022, 8:37 PM

                  @mumblebaj newsapi.org free is only 100 calls per day

                  I guess 4/hour is ok

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    DarrenHill @sdetweil
                    last edited by DarrenHill Sep 10, 2022, 10:18 AM Sep 10, 2022, 10:18 AM

                    @sdetweil - thanks - tried your API key and it gives exactly the same results as my original one.

                    I also put my original API key into the chat, if you have time and are able could you test it for me?

                    I’m starting to think that for some reason NewsAPI cannot provide a proper service to UK IP addresses or something like that.

                    And I guess if that’s the case then we’re stuck, as everything provided by MM and you guys is all working fine, it’s just their API data that is for some reason messed up.

                    By the way, can I take this moment to also thank both you and @mumblebaj for the support to look into this.

                    D 1 Reply Last reply Sep 10, 2022, 10:23 AM Reply Quote 0
                    • D Offline
                      DarrenHill @DarrenHill
                      last edited by Sep 10, 2022, 10:23 AM

                      To add - I checked via the web link (in Chrome) and both keys give exactly the same response:

                      Original:

                      {"status":"ok","totalResults":10,"articles":[{"title":"Charles formally confirmed as king in ceremony televised for first time","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-10T09:22:16.0519529Z","url":"http://www.bbc.co.uk/news/uk-62860893"},{"title":"Kharkiv offensive: Russia surprised as Ukraine takes several towns - UK","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-10T08:37:17.1082493Z","url":"http://www.bbc.co.uk/news/world-europe-62860774"},{"title":"Sir Elton John pays tribute to Queen Elizabeth II","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-10T01:22:23.3573709Z","url":"http://www.bbc.co.uk/news/entertainment-arts-62860047"},{"title":"In pictures: Queen Elizabeth II in North America","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T21:37:18.1845741Z","url":"http://www.bbc.co.uk/news/world-us-canada-62854864"},{"title":"What do we call the Royal Family now?","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T18:22:20.0913328Z","url":"http://www.bbc.co.uk/news/uk-62854804"},{"title":"In pictures: King Charles' first full day on the throne","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T17:07:22.1996941Z","url":"http://www.bbc.co.uk/news/in-pictures-62797450"},{"title":"Six times the Queen made us laugh","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T16:22:20.8594645Z","url":"http://www.bbc.co.uk/news/uk-62849166"},{"title":"Outpouring of sympathy across the Commonwealth","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T12:52:20.8883515Z","url":"http://www.bbc.co.uk/news/world-62852412"},{"title":"Queen Elizabeth II: Your tributes to UK's longest-reigning monarch","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T09:07:26.059624Z","url":"http://www.bbc.co.uk/news/live/uk-62847455"},{"title":"Royal rebranding: What will happen to stamps, coins, banknotes and passports?","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T07:22:20.9827975Z","url":"http://www.bbc.co.uk/news/uk-59596996"}]}
                      

                      New:

                      {"status":"ok","totalResults":10,"articles":[{"title":"Charles formally confirmed as king in ceremony televised for first time","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-10T09:22:16.0519529Z","url":"http://www.bbc.co.uk/news/uk-62860893"},{"title":"Kharkiv offensive: Russia surprised as Ukraine takes several towns - UK","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-10T08:37:17.1082493Z","url":"http://www.bbc.co.uk/news/world-europe-62860774"},{"title":"Sir Elton John pays tribute to Queen Elizabeth II","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-10T01:22:23.3573709Z","url":"http://www.bbc.co.uk/news/entertainment-arts-62860047"},{"title":"In pictures: Queen Elizabeth II in North America","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T21:37:18.1845741Z","url":"http://www.bbc.co.uk/news/world-us-canada-62854864"},{"title":"What do we call the Royal Family now?","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T18:22:20.0913328Z","url":"http://www.bbc.co.uk/news/uk-62854804"},{"title":"In pictures: King Charles' first full day on the throne","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T17:07:22.1996941Z","url":"http://www.bbc.co.uk/news/in-pictures-62797450"},{"title":"Six times the Queen made us laugh","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T16:22:20.8594645Z","url":"http://www.bbc.co.uk/news/uk-62849166"},{"title":"Outpouring of sympathy across the Commonwealth","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T12:52:20.8883515Z","url":"http://www.bbc.co.uk/news/world-62852412"},{"title":"Queen Elizabeth II: Your tributes to UK's longest-reigning monarch","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T09:07:26.059624Z","url":"http://www.bbc.co.uk/news/live/uk-62847455"},{"title":"Royal rebranding: What will happen to stamps, coins, banknotes and passports?","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-09-09T07:22:20.9827975Z","url":"http://www.bbc.co.uk/news/uk-59596996"}]}
                      

                      So the data is there, it’s not the module or the code, so it must be the API response specifically to my IP address or set-up. And if it is, we’re stuck and I guess I’ll just have to remove the module from my set-up.

                      D 1 Reply Last reply Oct 19, 2022, 7:24 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 4 / 4
                      4 / 4
                      • First post
                        33/40
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy