Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some of the start/end dates came up as null #3

Closed
KiprasJ opened this issue Oct 12, 2022 · 6 comments
Closed

Some of the start/end dates came up as null #3

KiprasJ opened this issue Oct 12, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@KiprasJ
Copy link

KiprasJ commented Oct 12, 2022

Hello,

I am noticing some missing start/end dates. Example:

[
   {
      "eventID":"season-12-master-league_evolution-cup",
      "name":"Master League and Evolution Cup | Season of Light",
      "eventType":"go-battle-league",
      "heading":"GO Battle League",
      "link":"https://leekduck.com/events/season-12-master-league_evolution-cup/",
      "image":"https://leekduck.com/assets/img/events/gobattleleague-master-key.jpg",
      "start":null,
      "end":"2022-10-13T20:00:00.000Z",
      "extraData":null
   },
   {
      "eventID":"mega-manectric-in-mega-raids-october-2022",
      "name":"Mega Manectric in Mega Raids",
      "eventType":"raid-battles",
      "heading":"Raid Battles",
      "link":"https://leekduck.com/events/mega-manectric-in-mega-raids-october-2022/",
      "image":"https://leekduck.com/assets/img/events/mega-default.jpg",
      "start":null,
      "end":"2022-10-20T10:00:00.000",
      "extraData":{
         "raidbattles":{
            "bosses":[
               {
                  "name":"Mega Manectric",
                  "image":"https://leekduck.com/assets/img/pokemon_icons/pokemon_icon_310_51.png",
                  "canBeShiny":true
               }
            ],
            "shinies":[
               
            ]
         }
      }
   },
   {
      "eventID":"shiny-corsola-okinawa-shirt-pikachu",
      "name":"Pikachu wearing an Okinawan kariyushi shirt and Shiny Corsola",
      "eventType":"location-specific",
      "heading":"Location-specific",
      "link":"https://leekduck.com/events/shiny-corsola-okinawa-shirt-pikachu/",
      "image":"https://leekduck.com/assets/img/events/pikachu-okinawa.jpg",
      "start":null,
      "end":null,
      "extraData":null
   }
]
@bigfoott
Copy link
Owner

Hi! Sorry about the delay, I completely missed this.

This appears to be an issue with how these specific events are shown on the LeekDuck page.

How the events page works is there are two event items on the page, one in the current section and one in the upcoming section. Then based on the local time, one of the two events is hidden. I'm not sure why these events are missing their start dates unfortunately, and without those extra elements on the page itself I don't believe it'd be possible to get this info.

I'll be reaching out to Leek to see if there's a specific edge case for these I've missed, and how best to handle it :)

Also a side note, the Shiny corsola event is null because we haven't been given an end date for that event lol

@bigfoott bigfoott self-assigned this Oct 17, 2022
@bigfoott bigfoott added the bug Something isn't working label Oct 17, 2022
@KiprasJ
Copy link
Author

KiprasJ commented Oct 17, 2022

Thanks for the response, yeah I already dug into the code as well to see where the issue might be. But it seems it depends on the elements which are on the actual event page from LeekDuck. Anyway, a nice feature. I'm using your JSON for a discord bot, but its more for personal use. Anyways, I'm glad that I found this because I started writing my own version of a similar scraper. Keep up with a good work! 😄

@bigfoott
Copy link
Owner

Np! I'm glad you've found this useful! 😄 I'll let you know when I hear back from Leek and/or I implement some sort of workaround.

@KiprasJ
Copy link
Author

KiprasJ commented Oct 17, 2022

Seems like there are more issues coming in:

{
        "eventID": "november-communityday2022",
        "name": "Teddiursa Community Day",
        "eventType": "community-day",
        "heading": "Community Day",
        "link": "https://leekduck.com/events/november-communityday2022/",
        "image": "https://leekduck.com/assets/img/events/cd-2022-11-teddiursa.jpg",
        "start": "2022-11-12T14:00:00.000",
        "end": "2022-11-12T17:00:00.000",
        "extraData": {
            "communityday": {
                "communityday": {
                    "communityday": {
                        "communityday": {
                            "communityday": {
                                "communityday": {
                                    "communityday": {
                                        "communityday": {
                                            "communityday": {
                                                "communityday": {
                                                    "communityday": {
                                                        "communityday": {
                                                            "communityday": {
                                                                "communityday": {
                                                                    "communityday": {
                                                                        "communityday": {
                                                                            "communityday": null
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    },

@bigfoott
Copy link
Owner

Hey! Wow, that's a new one lol. I've fixed the issue causing this in cd18489 and 5f9a02e.

@bigfoott
Copy link
Owner

Hi! Sorry for the delay on replying to this issue. This was actually fixed in c8b331a last week, I forgot to close this issue though.

The date data is now pulled from the events feed provided by Leek, so both values should always be populated now, unless there's an issue on the LeekDuck end :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants