Open TheOGGump opened 3 years ago
My guess is that the HTML on the baseball page is slightly different, so the selectors used in the current code don't find all the players.
If you enable the Verbose level in the browser console you should be able to see the roster the extension wants to set up after clicking the Auto button. If the roster it prints out doesn't include pitchers it means that the extension didn't detect them as being part of the roster at all. If it does contain pitchers but they still don't get updated it's probably because it can't find the buttons for moving them.
I've created my own MLB fantasy league and team for testing. I wasn't able to schedule the draft for today, so I'll have to wait until tomorrow. Hopefully I can assist you after that.
Thanks for the interest!
Hey @TheOGGump , it looks like this is affecting the hockey page as well, the goalies are not updating. I wrote some observations in #9, but I'd guess it's the same problem for both.
@cameronkeif confirms that the "No Move button found" warning gets printed (at least for the NHL). That appears to indicate that the extension finds the players in the second table but can't find the move buttons when the time has come to reshuffle them. The code expects the move button to be an element with the CSS class "move-action-btn" somewhere inside the tr element that represents the row, so if for some reason that's not the case it won't find anything there.
Another, perhaps more likely, possibility is that it's picking up an extra row that's not supposed to be there, or not offsetting the row count correctly. It could be something to do with the header rows, the Bench rows, the IR rows, etc.
Finally there's the possibility that the bug in #7 (or something similar) is causing some extra issues here when the rows get moved, but in that case I would expect the first goalie/pitcher move to be correct and only subsequent ones in the bottom table to be affected.
I have an MLB league now, so I should be able to check this myself at some point, but since regular work is starting back up and I've been dealing with some personal stuff it may take a while before I can look into it.
@TheOGGump You may have more luck with the pitchers if you try this with the newest version of master.
Appreciating the assistance with this, sorry for the late reply as work has been pretty hectic.
I ran both extensions (NHL and MLB). I can also confirm that NHL's runs and moves goalies.
For the MLB side, it looks like the extension is having some issues.
Looking at the error that Chrome throws, it is having issues finding the move buttons. I've attached what I'm receiving, but I'm not getting much else from the error.
@TheOGGump do you have the code pushed anywhere? I could try to take a look and see if it might be an issue similar to what I experienced while doing hockey.
- Players with a game in the starting lineup are moved for players with a game on the bench
For the record, this is something the extension will sometimes do on purpose. Sometimes it does it because the player in the lineup and the player on the bench have different possible positions, and swapping them is necessary to fit as many players as possible in the lineup. Other times it does it simply because the algorithm isn't as smart as it could be, so it doesn't always realize that it's better to keep players where they are.
- Only some moves are made for a given day, before Chrome throws an error. Not all possible moves are made.
- Pitchers do not update
- Weekly auto-set does not move past the first day, most likely due to the extension not finding the move buttons
Yes, most likely these are all caused by the same thing. If the extension gets to a spot where it can't find one of the buttons it expects, it will stop completely.
I have the mlb code up in a repository on my profile. I am new to github, so let me know if you need anything else with this.
As a sidenote, I'd like to clean up the code a bit before adding another sport into the mix, as there's quite a bit of unnecessary duplication right now. But feel free to try to get the MLB version working with the current code.
Hello,
I am working on setting this up in order to utilize this with ESPN's fantasy baseball. I've looked through each file/code and it's pretty straightforward for setting up with baseball positions. The only changes I found needed to be made were the SLOT_TYPE and POSITION_SLOT_MAPPING to accommodate the different positions, replacing Injured Reserve (IR) with Injured List (IL), and the URL in the manifest.
The only issue I am having, is even after reading through the entire NHL conversation and utilizing Cameron's code updates, the second table (for goalies in NHL and pitchers in MLB) do not update. I do not receive any error messages, the first table updates without issue, I just cannot replication Cameron's demo with NHL.