Wikipedia:Bots/Requests for approval/Chartbot 4


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Symbol keep vote.svg Approved

Chartbot 4
Operator:

Time filed: 23:19, Saturday March 23, 2013 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): PHP

Source code available:

Function overview: Repair obsolete Billboard charts

Links to relevant discussions (where appropriate):

Edit period(s): one time run followed by a second clean-up pass

Estimated number of pages affected: 1000

Exclusion compliant (Yes/No): Yes

Already has a bot flag (Yes/No): Yes

Function details:

Yet another set of obsolete Billboard URLs. This time, it's the class that looks like. If you look at the context in MTV Unplugged (Shakira album), you can see that the original article expects to find chart positions for the album. Billboard doesn't arrange its articles exactly that way any more, but I can come close.

First key is the performer id (pid). In this case, I can build http://www.billboard.com/artist/dummy/147604. Billboard will redirect the URL and 404 the result, because "dummy" isn't a good artist. Note that the failing redirect is to http://www.billboard.com/artist/278867/dummy, though. From that URL, I can extract 278867, and build http://www.billboard.com/node/278867. That page redirects to http://www.billboard.com/artist/278867/shakira, which gives me enough information to build a URL to the chart listing.

Using similar processing, I can salvage links like http://www.billboard.com/bbcom/bio/index.jsp?pid=23708, used in Ramsey Lewis. It becomes http://www.billboard.com/artist/dummy/23708 which becomes http://www.billboard.com/node/359857 which becomes http://www.billboard.com/artist/359857/ramsey-lewis.

This bot will look for links in these two forms and replace them with the modern forms. It's only a mild rework of Chartbot 3, as the redirect chasing logic needs a trivial extension. It will flag any artists that are not included in BillboardID and not perform the repair if that is the case. It will require a second run after BillboardID has been repaired to pick up any stragglers.

Discussion
 MBisanz  talk 07:00, 24 March 2013 (UTC)
 * Just ran the 50 edits, from 26 mrt 2013 01:57 to 26 mrt 2013 02:30. Looking at edits like this one, you can see that the algorithm pulls out the correct article. I also found that the code worked well with the forms http://www.billboard.com/..../bio/pid and http://www.billboard.com/artist/name/pid, so I've added those patterns in. An example of one of those edits is here. There was one slip with specifying "bio=true" in the template when "chart=all" would have been more appropriate, but that's a trivial fix.&mdash;Kww(talk) 02:33, 26 March 2013 (UTC)

 MBisanz  talk 22:50, 27 March 2013 (UTC)


 * The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.