User talk:SnorlaxMonster: Difference between revisions

m
Text replacement - "Help:Why create an account" to "SmashWiki:Why create an account?"
m (Text replacement - "Help:Why create an account" to "SmashWiki:Why create an account?")
 
(2 intermediate revisions by 2 users not shown)
Line 5: Line 5:
:'''[[Special:Recentchanges|Recent changes]]''' is a great first stop, because you can see what other people are editing right this minute, and where you can help.
:'''[[Special:Recentchanges|Recent changes]]''' is a great first stop, because you can see what other people are editing right this minute, and where you can help.


:'''Please [[Special:Userlogin|sign in]]''', if you haven't already, and create a user name! It's free, and it'll help you keep track of all your edits. See [[Help:Why create an account]] for more info on creating an account.
:'''Please [[Special:Userlogin|sign in]]''', if you haven't already, and create a user name! It's free, and it'll help you keep track of all your edits. See [[SmashWiki:Why create an account?]] for more info on creating an account.


:'''Questions?'''  You can ask at the [[Forum:Help desk|Help desk]] or on the [[Help:Talk page|"discussion" page]] associated with each article, or post a message on [[User talk:SnorlaxMonster|my talk page]]!
:'''Questions?'''  You can ask at the [[Forum:Help desk|Help desk]] or on the [[Help:Talk page|"discussion" page]] associated with each article, or post a message on [[User talk:SnorlaxMonster|my talk page]]!
Line 36: Line 36:
:::--[[User:SnorlaxMonster|<span style="color:#A70000">'''Snorlax'''</span>]][[User talk:SnorlaxMonster|<span style="color:#0000A7">'''Monster'''</span>]] 07:27, August 27, 2020 (EDT)
:::--[[User:SnorlaxMonster|<span style="color:#A70000">'''Snorlax'''</span>]][[User talk:SnorlaxMonster|<span style="color:#0000A7">'''Monster'''</span>]] 07:27, August 27, 2020 (EDT)
::::Oh, <code>action=raw</code> seems super handy, I'll use that. I think that should be all I need to get started. Thanks for your help! <s>(now to refresh myself on regex for the 50th time)</s> --[[User:CanvasK|CanvasK]] ([[User talk:CanvasK|talk]]) 07:39, August 27, 2020 (EDT)
::::Oh, <code>action=raw</code> seems super handy, I'll use that. I think that should be all I need to get started. Thanks for your help! <s>(now to refresh myself on regex for the 50th time)</s> --[[User:CanvasK|CanvasK]] ([[User talk:CanvasK|talk]]) 07:39, August 27, 2020 (EDT)
:::::Yeah, if all you're doing is scraping the tables and concatenating the rows together, that should be fairly straightforward.
:::::I had also set the code up to store every row in a dict, so I could feed it a list of Spirits (i.e. for a Spirit Board event) and it would output a table of just those Spirit Battles, in the supplied order. It also adds the series as an additional column (as you can see on my [[User:SnorlaxMonster/Spirit Battles|userpage]]), which requires it to parse the "Series Order" table from the bottom of the page too. Those two parts are probably the most complicated parts. --[[User:SnorlaxMonster|<span style="color:#A70000">'''Snorlax'''</span>]][[User talk:SnorlaxMonster|<span style="color:#0000A7">'''Monster'''</span>]] 07:51, August 27, 2020 (EDT)
::::::I got the code working about a month ago and felt like giving you an update. I went with the row-to-dict like you mentioned though I eventually saved it as a .tsv to be used in a spreadsheet. I parsed the "Series Order" table first and then parsed the "Spirit Battle" table, adding to the dict based on the first cell (number). For Mii DLC battles I checked if a cell contained "rowspan", if so then go ahead and parse the next row (which has the Mii DLC info), increment the loop index, and add the Mii DLC to the dict based on what cells in the primary row ''don't'' have "rowspan". I did the same for the fighter pages; didn't need to parse a "Series Order" table but did run the code three times to do "main", "minion", and "ally" (three function calls, not three page requests). Another reason I used .tsv in the output is so I can keep track of fighters and not worry about mixing up or deleting inspiration sections.
::::::Again, I'd like to say thank you for help and getting me on track. --[[User:CanvasK|CanvasK]] ([[User talk:CanvasK|talk]]) 21:16, February 20, 2021 (EST)