UNSOLVED MMM-RottenTomatoes displays awaiting update
The MMM-RottenTomatoes module has been displaying "Awaiting update for a couple of days now yet when I go and do a git pull I’m told the module is up to date. Any idea what is going on.
Rotten tomato changed to there web format recently. Small changes are needed to the NPMJS-rt-scraper index.js file to support the changes. My changes were base @Parnic changes.
Below is my update index.js replacing the installed package rt-scaper index.js will correct the issue.
Thanks, I’ll try that tonight.
@haywire Thanks for this. I’m a newbie, could you walk me through the steps of updating this file with the one that you provided? I tried searching my MMM-RottenTomatoes folder for any mention of index.js or rt-scraper and nothing came up.
EDIT: Found the file, located here: /MagicMirror/modules/node_modules/rt-scraper/index.js. I’ve copied and pasted the text from the git link however it’s still Awaiting Update. Not sure if I did something wrong.
I also copied and pasted your code and it is still stuck in awaiting update? Any help getting this cool little module to work would be greatly appreciated.
Sorry to hear it didn’t work for you. I am making the assumption your using the original pull which were from https://github.com/AdamMoses-GitHub/NPMJS-rt-scraper.
Unfortunately, I modified the original MMM-RottenTomatoes, so I don’t have a like for a like environment, but assumed correction would work for the original module.
The root of the problem is Rotten Tomato new web format, which is part of rt-scraper (which you found).
As indicate my fix were based on another user correction. You can attempt to pull or replace using his build.
He has also updated his repo for RottenTomatoes module it self and updated the dependency. I haven’t tried it, but seem he best overall re-package solution.
If that still doesn’t work and have time I can re-package my update, but it would be base on slight modified version of MMM-RottenTomatoes.
@haywire it worked. took some time for the first update but after that it has been working perfectly. THANKS!
I tried this but it did not work for me…
Tried removing old MMM-RottenTomatoes and installing https://github.com/parnic/MMM-RottenTomatoes
It got the “Awaiting update” message fixed but the only thing showing up now is the:
box office, opening this week, coming soon
without any movies.
Using the same config.js as I did for the old MMM-RottenTomatoes
Also tried manually removing rt-scraper and then cloning from https://github.com/parnic/NPMJS-rt-scraper but still no success…
I found a (dirty) workaround.
Inspecting https://www.rottentomatoes.com/m/dream_horse, you can see the sidebar that used to be on the homepage. The structure is the same as before, except that the name of the div-element is different than assumed in the rt-scraper code.
So, this is what I did to get it working:
- Go to the node-modules/rt-scraper directory in your MagicMirror installation dir.
- Edit index.js
- Replace the three instances of “homepage-top-box-office” with “movies_sidebar”
- Replace the request uri rottentomatoes.com to rottentomatoes.com/m/dream_horse
- Restart MagicMirror and you should now see the RT movie listing appearing again.
Now, this is dirty, because of the Dream Horse link. I’m think about a better way (take the first movie on the site?) and commit to github. But for now we can at least enjoy the movie listings again.
’m think about a better way (take the first movie on the site?) and commit to github
find the github repo for the module you fixed,
fork it (now YOU have a linked ‘copy’)
make the same changes, commit to YOUR copy
and then offer a Pull Request (new pull request button) to the source to fix the problem for all