Wikipedia:Bots/Requests for approval/BeepBot
- 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
Withdrawn by operator.
Operator: Wolfgang42 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 05:05, Sunday October 21, 2012 (UTC)
Automatic, Supervised, or Manual: Automatic
Programming language(s): PHP
Source code available: Yes, automatically uploaded to the bot's user page
Function overview: Upload a graph of the current US President's job approval ratings.
Links to relevant discussions (where appropriate): Wikipedia:Bots/Requests for approval/SoxBot II 6
Edit period(s): Daily
Estimated number of pages affected: One file (changed daily)
Exclusion compliant (Yes/No): No
Already has a bot flag (Yes/No): No
Function details: Generates and uploads an SVG graph of the current president's approval ratings. Currently this file is File:Barack Obama's Presidential Job Approval Ratings, 2009-2012 (Gallup Poll).svg but this would be changed every term to reflect the current president and term. For example, if Romney wins the next election it would be File:Mitt Romney's Presidential Job Approval Ratings, 2012-2016 (Gallup Poll).svg, and retrieve its data from the proper URL on Gallup's website.
Discussion
[edit]Note that the source code on the bot's user page is not currently up-to-date; I'll update it in the next couple of days. Wolfgang42 (talk) 05:05, 21 October 2012 (UTC)[reply]
- Update complete. The full source is now available at User:BeepBot/source. Wolfgang42 (talk) 21:33, 21 October 2012 (UTC)[reply]
- You accidentally published the password of the bot, which I've had another admin rev-del (and your email). Please change it immediately. Legoktm (talk) 21:47, 21 October 2012 (UTC)[reply]
- I already changed the password, but thanks for noticing. The email hadn't even occurred to me. Wolfgang42 (talk) 22:31, 21 October 2012 (UTC)[reply]
- You accidentally published the password of the bot, which I've had another admin rev-del (and your email). Please change it immediately. Legoktm (talk) 21:47, 21 October 2012 (UTC)[reply]
Approved for trial (50 edits or 5 days). Please provide a link to the relevant contributions and/or diffs when the trial is complete. MBisanz talk 01:21, 22 October 2012 (UTC)[reply]
- I think I set up the cron job right. If I did (we'll see tomorrow morning) then I'll continue running it until Oct 26. Wolfgang42 (talk) 02:00, 22 October 2012 (UTC)[reply]
- The API claims I've been blocked for editing. I'll look into this further later in the day in case it's something I broke, but can you just check to make sure that User:BeepBot hasn't been blocked? Thanks! Wolfgang42 (talk) 10:52, 22 October 2012 (UTC)[reply]
- Doesn't look blocked. — HELLKNOWZ ▎TALK 10:54, 22 October 2012 (UTC)[reply]
- It's not, but the API tells me it is when I try to run the bot on my shared web host. I'm going to have yo suspend the trial for now. Anyone know where to ask for questions about the API? Wolfgang42 (talk) 11:56, 22 October 2012 (UTC)[reply]
- Can you copy the exact request you are sending and the API reply? — HELLKNOWZ ▎TALK 11:57, 22 October 2012 (UTC)[reply]
- I'm using User:BeepBot/source/lib/botclasses.php (except that CURLOPT_FOLLOWLOCATION isn't being set); I'm not quite sure how to get curl to show the request. The response is being unserialized into:
- Can you copy the exact request you are sending and the API reply? — HELLKNOWZ ▎TALK 11:57, 22 October 2012 (UTC)[reply]
- It's not, but the API tells me it is when I try to run the bot on my shared web host. I'm going to have yo suspend the trial for now. Anyone know where to ask for questions about the API? Wolfgang42 (talk) 11:56, 22 October 2012 (UTC)[reply]
- Doesn't look blocked. — HELLKNOWZ ▎TALK 10:54, 22 October 2012 (UTC)[reply]
array(2) { ["servedby"]=> string(4) "mw70" ["error"]=> array(5) { ["code"]=> string(7) "blocked" ["info"]=> string(34) "You have been blocked from editing" ["filekey"]=> string(32) "10y5nawpal4k.s88w7k.17692124.svg" ["sessionkey"]=> string(32) "10y5nawpal4k.s88w7k.17692124.svg" ["invalidparameter"]=> string(8) "filename" } }
Wolfgang42 (talk) 14:04, 22 October 2012 (UTC)[reply]
- Also the other thing to note is that the exact same code works fine on my computer, but not on the shared hosting server. Wolfgang42 (talk) 14:04, 22 October 2012 (UTC)[reply]
- What are you trying to do exactly? Are you sure users group is allowed to do that? Looks like it's related to file uploads. "invalidparameter" field suggests the error may not be the account being blocked, rather a wrong/unimplemented error message for some misformatted request. — HELLKNOWZ ▎TALK 14:15, 22 October 2012 (UTC)[reply]
- I'm trying to upload the image. The exact same code works on my laptop, so it's not a permissions problem and it shouldn't be a misformatted request. Wolfgang42 (talk) 14:25, 22 October 2012 (UTC)[reply]
- Well, perhaps your server is failing to login. I see you have a "$wikipedia->login($username,$password);" line, but no checks if the login was successful or not. If it wasn't and the code carries on, then API might return errors for anonymous uploads. — HELLKNOWZ ▎TALK 14:48, 22 October 2012 (UTC)[reply]
- I'm trying to upload the image. The exact same code works on my laptop, so it's not a permissions problem and it shouldn't be a misformatted request. Wolfgang42 (talk) 14:25, 22 October 2012 (UTC)[reply]
- Sounds to me like the shared host's IP is hard-blocked. Anomie⚔ 17:03, 22 October 2012 (UTC)[reply]
- I'd hazard a guess that that's probably the case. It's a free shared hosting server, and I wouldn't be surprised if someone has been trying to mess with Wikipedia from it in the past. The other thing it could be is some oddity of their php.ini--I get all sorts of strange errors that I have to work around when I use their services. It's not login failures or any such, since it works fine on my laptop. Where would I look to see if an IP is blocked from editing on Wikipedia? Wolfgang42 (talk) 19:19, 22 October 2012 (UTC)[reply]
- What are you trying to do exactly? Are you sure users group is allowed to do that? Looks like it's related to file uploads. "invalidparameter" field suggests the error may not be the account being blocked, rather a wrong/unimplemented error message for some misformatted request. — HELLKNOWZ ▎TALK 14:15, 22 October 2012 (UTC)[reply]
- Also the other thing to note is that the exact same code works fine on my computer, but not on the shared hosting server. Wolfgang42 (talk) 14:04, 22 October 2012 (UTC)[reply]
I notice you have a lot of source code in the bot's userspace. We generally advise against that, as in WP:NOTWEBHOST. Also note that all content on Wikipedia is CC-by-SA 3.0 and GFDL, so posting code licensed differently just makes a mess. — HELLKNOWZ ▎TALK 14:15, 22 October 2012 (UTC)[reply]
- I saw some other bot doing this and it seemed like a good idea at the time. When I re-submit this BRFA (see below) I'll put the source on GitHub or an SVN server instead. Wolfgang42 (talk) 23:33, 22 October 2012 (UTC)[reply]
- Is the bot auto-confirmed yet? If not, it won't be able to upload anything yet. (An admin could give it the 'confirmed' right then.) Legoktm (talk) 16:28, 22 October 2012 (UTC)[reply]
- Yes, it is Special:Log/BeepBot. — HELLKNOWZ ▎TALK 16:32, 22 October 2012 (UTC)[reply]
- If it's on a webhost server and the other BAGers don't think it's a bad idea, I could always give the bot IPBE to let it edit. MBisanz talk 21:39, 22 October 2012 (UTC)[reply]
Withdrawn by operator. I think I'm going to give up running it on my webhost's server. Trying to get programs to work on their servers requires too much effort. Instead, I'm going to request a toolserver account and run it there. I also realized that my bot isn't named per Wikipedia:Bot policy#Bot accounts, so I'm going to rename it and submit another BRFA later. Wolfgang42 (talk) 23:33, 22 October 2012 (UTC)[reply]
- 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.