kickscondor / fraidycat

Follow blogs, wikis, YouTube channels, as well as accounts on Twitter, Instagram, etc. from a single page.
Other
1.76k stars 56 forks source link

GOG RSS is parsed wrong (50Y) #95

Closed JasonSwindle closed 4 years ago

JasonSwindle commented 4 years ago

Desktop (please complete the following information):

Describe the bug FraidyCat thinks the last update for GOG was 50 years ago (LOL), and does not seem to order post correctly either.

FraidyCat

GOG.com News 50Y

    Weekly Sale: grand strategy games up to 80% off 50Y
    Warhammer Week with new titles and deals up to 75% off 50Y
    8 skull-crushing video games set in the Warhammer universe 50Y
    Release: THE LONGING 50Y
    Warsaw game is here! 50Y
    Pre-order: Good Company 50Y
    Midweek Sale: Action-packed games up to 75% off 50Y
    Get ready! Two jaw-punching fighting games land on GOG.COM! 50Y

RSS

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>GOG.com News</title>
        <link>http://www.gog.com/frontpage/rss</link>
        <description>The latest news for GOG.com</description>
        <lastBuildDate>Wed, 11 Mar 2020 10:22:12 EET</lastBuildDate>
        <pubDate>Wed, 11 Mar 2020 10:22:12 EET</pubDate>
                    <item>
                <title>Get ready! Two jaw-punching fighting games land on GOG.COM!</title>
                <link>http://www.gog.com/news/get_ready_two_jawpunching_fighting_games_land_on_gogcom</link>
                <guid>http://www.gog.com/news/get_ready_two_jawpunching_fighting_games_land_on_gogcom</guid>
                <description><![CDATA[<p><b>There’s nothing like a good old virtual pounding from time to time. That's why we are more than happy to welcome two exceptional fighting games, Mortal Kombat 4 and The friends of Ringo Ishikawa, on our DRM-free ring.</b><br/> <br/><h2>Mortal Kombat 4</h2><br/>It was the year 1997 and all game magazines were booming - Mortal Kombat goes 3D! The series created by Ed Boon and John Tobias already had cult status, but everybody was curious if it would survive such a revolution. Abandoning the traditional digitalized 2D graphics known from the previous Mortal Kombat games indeed seemed risky. Eventually, it took Tobias and Boon three years of hard work to create <a  href="https://www.gog.com/game/mortal_kombat_4">Mortal Kombat 4</a>.<br/> <br/><div ><br/><iframe  width="775" height="436"src=https://youtube.com/embed/nAH5W6qrfSs?time_continue=154&v=nAH5W6qrfSs&feature=emb_logo?wmode=opaque&rel=0" frameborder="0" allowfullscreen></iframe></div><br/><br/>The final result was warmly welcomed by the fans, who liked the turn into the more dark, bloody direction of the Mortal Kombat franchise. For example, creators focused on the brutal Fatality endings to the fight, excluding humoresque elements like Friendship or Babality. Popular characters, like Johnny Cage, Raiden, and Goro, returned after some time of absence, while new fighters - Quan Chi, Shinnok or Tanya - quickly garnered many fans.<br/> <br/><b>Just like its predecessors, Mortal Kombat 4 remains extremely fun to play even after many years since its release. Thanks to GOG.COM you can enjoy this game and its sheer dynamic playability once again</b>.<br/> <br/><h2>The friends of Ringo Ishikawa</h2><br/>Remember that magic sound made by the coin inserted into the old arcade machine? Among many cult arcade games, side-scrolling fighting titles were very prominent. <a  href="https://www.gog.com/game/the_friends_of_ringo_ishikawa">The friends of Ringo Ishikawa</a> from yeo is such a game, yet combined with an open world and an engaging coming-of-age story. The main character of this title, a high school gang leader Ringo Ishikawa, has but one goal - to live through his last autumn before graduation.<br/><br/><div ><br/><iframe  width="775" height="436"src=https://www.youtube.com/embed/SkK_ag3HH38?time_continue=154&v=nAH5W6qrfSs&feature=emb_logo?wmode=opaque&rel=0" frameborder="0" allowfullscreen></iframe></div><br/> <br/>With best friends by his side, he travels through the city and school grounds engaging in a brutal fight from time to time. As its creator describes it, The friends of Ringo Ishikawa is an existential open world beat ‘em up game with some school sim elements. It gives you quite a lot of freedom in exploring the town which undergoes the day-night cycle and has a lot of NPCs. <br/><br/><b>Apart from the game's story, elements like the hand-to-hand combat or mini-games (e.g. ping-pong and video-poker) will keep you immersed in The friends of Ringo Ishikawa for long!</b><br/> <br/>As you can see, with two mentioned above releases we are not pulling any punches. It’s up to you to choose your favorite contestant or sidekick and pulverize all enemies standing in your way into smoking dust!<br/></p>]]></description>
                <pubDate>Wed, 11 Mar 2020 10:22:12 EET</pubDate>
            </item>
                    <item>
                <title>Midweek Sale: Action-packed games up to 75% off</title>
                <link>http://www.gog.com/news/midweek_sale_actionpacked_games_up_to_75_off</link>
                <guid>http://www.gog.com/news/midweek_sale_actionpacked_games_up_to_75_off</guid>
                <description><![CDATA[<p>Thirsty for some pure entertaining mayhem? <b>The latest <a  href="http://www.gog.com/promo/20200311_midweek_action_games">Midweek Sale</a> on GOG.COM is dedicated to action games with discounts reaching up to 75%. </b> Here are some examples:<br/><br/><b>Broforce (-75%)</b> is an action combat game about an over-powered paramilitary organization dealing exclusively in excessive force against crime and evildoers.<br/><br/><b>Mortal Kombat 1+2+3 (-75%)</b> is a pack of three cult titles from the bloody fighting game saga. Win the tournament and save our world from the threat of Netherrealm.<br/><br/><b>The friends of Ringo Ishikawa (-50%)</b> is a beat ‘em up game with sim elements. Join Ringo Ishikawa, the high school gang leader, in his struggle for survival.<br/><br/>Check other action-packed and DRM-free titles! <b>This <a  href="http://www.gog.com/promo/20200311_midweek_action_games">Midweek Sale</a> on GOG.COM will last until 14th March 2020, 2 PM UTC.</b><br/></p>]]></description>
                <pubDate>Wed, 11 Mar 2020 11:53:31 EET</pubDate>
            </item>
AlexReff commented 4 years ago

Offending line: https://github.com/kickscondor/fraidyscrape/blob/master/index.js#L117

Example non-working string: Wed, 11 Mar 2020 10:22:12 EET

Example working string: Wed, 11 Mar 2020 04:00:00 -0000

Core issue: RSS feed pubdate allows RFC 822 DateTime formatting, Javascript Date.Parse supports ISO 8601.

My recommendation would be to use Moment to handle parsing, but if you don't want that to be a dependency, you will have to either copy what they do for this or build your own 'Timezone Shorthand to -0000-formatted string converter'

Edit: to expand, this might be a localization issue with the browser's implementation of Date.parse - because Wed, 11 Mar 2020 10:22:12 PST works just fine for me, while the EET version does not, even though they are both valid timezones.

kickscondor commented 4 years ago

Ok, good - thank you for the suggestions. And thank you for doing the homework to track this down! You're dead on.

kickscondor commented 4 years ago

This turned out to be unknown time zones - a fix is in Fraidyscrape 1.0.4.

JasonSwindle commented 4 years ago

I'm still seeing everything listed as 50Y. Is the Fraidyscrape 1.0.4 fix in 1.13?

kickscondor commented 4 years ago

I'm sorry - I meant 1.1.4, still wrapping it up.