|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
#!/usr/bin/env python2
|
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
# Copyright (C) 2014 WikiTeam developers
|
|
|
|
|
# Copyright (C) 2014-2017 WikiTeam developers
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
@ -26,12 +26,9 @@ def main():
|
|
|
|
|
url = 'https://meta.miraheze.org/wiki/Special:SiteMatrix'
|
|
|
|
|
r = requests.get(url, headers=headers)
|
|
|
|
|
raw = r.text
|
|
|
|
|
m = re.findall(ur'<tr><td><a href="https://([^>]+?)/">[^<]+</a></td></tr>', raw)
|
|
|
|
|
m = re.findall(ur'<tr><td>(<del>)?<a href="https://([^>]+?)/">[^<]+</a>', raw)
|
|
|
|
|
for i in m:
|
|
|
|
|
print 'https://' + i + '/w/api.php'
|
|
|
|
|
n = re.findall(ur'<tr><td><del><a href="https://([^>]+?)/">[^<]+</a></del></td></tr>', raw)
|
|
|
|
|
for i in n:
|
|
|
|
|
print 'https://' + i + '/w/api.php'
|
|
|
|
|
print 'https://' + i[1] + '/w/api.php'
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
main()
|
|
|
|
|