@@ -0,0 +1,1713 @@
+import mwclient%0Aimport gspread%0Aimport urllib2%0Aimport urllib%0Afrom xml.dom import minidom%0A%0Adef split_list(alist, wanted_parts=1):%0A    length = len(alist)%0A    return %5B alist%5Bi*length // wanted_parts: (i+1)*length // wanted_parts%5D %0A             for i in range(wanted_parts) %5D%0A%0Adef check(tags):%0A    pageid=%5B%5D%0A    missing=%5B%5D%0A    invalid=%5B%5D%0A    for j in tags:%0A        try:%0A            for page in minidom.parse(urllib2.urlopen(%22https://www.baka-tsuki.org/project/api.php?action=query&titles=%25s&format=xml%22 %25 %22%7C%22.join(%5Burllib.quote(unicode(i).encode('UTF8')) for i in j%5D))).getElementsByTagName('page'):%0A                if page.attributes.has_key('pageid'):%0A                    pageid.append(page.getAttribute('title'))%0A                elif page.attributes.has_key('missing'):%0A                    missing.append(page.getAttribute('title'))%0A                elif page.attributes.has_key('invalid'):%0A                    invalid.append(page.getAttribute('title'))%0A                else:%0A                    print 'I haz problemz:', page.getAttribute('title')%0A        except urllib2.URLError, e:%0A            print(e)%0A    return pageid, missing, invalid%0A%0Ac = gspread.Client(auth=('user', 'pass'))%0Ac.login()%0Asht = c.open_by_key('0AheiUhJFmWFIdFhENFduU25GOGU3ZnpPMkVrZnByZkE')%0Aworksheet = sht.get_worksheet(0)%0A%0Alist = dict(%5B(worksheet.acell( 'A' + str( i ) ).value, worksheet.acell( 'H' + str( i ) ).value) for i in range(2,worksheet.row_count) if (worksheet.acell( 'H' + str( i ) ).value != '')%5D)%0A%0Ap,m,i = check(split_list(list.keys(),10))%0A%0Asite = mwclient.Site('baka-tsuki.org', path='/project/')%0Asite.login(%22User%22, %22Password%22)%0Apage = site.Pages%5B''%5D%0Atext = page.edit()%0Apage.save(text + u'%5Cnstrange stuff', summary = 'Bot Test')%0A

Create btSU.py