Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F12459
wikipedia.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 22 2014, 2:31 AM
2014-11-22 02:31:22 (UTC+0)
Size
878 B
Referenced Files
None
Subscribers
None
wikipedia.patch
View Options
Index: wikipedia.py
===================================================================
--- wikipedia.py (Revision 8976)
+++ wikipedia.py (Arbeitskopie)
@@ -7251,9 +7251,8 @@
if not hasattr(self, "_mw_version"):
versionpage = self.getUrl(self.get_address("Special:Version"))
htmldata = BeautifulSoup(versionpage, convertEntities="html")
- versionstring = htmldata.findAll(text="MediaWiki"
- )[1].parent.nextSibling
- m = re.match(r"^: ([0-9]+)\.([0-9]+)(.*)$", str(versionstring))
+ versionstring = htmldata.body.table.findAll('td')[1].contents[0]
+ m = re.match(r"^([0-9]+)\.([0-9]+)(.*)$", str(versionstring))
if m:
self._mw_version = (int(m.group(1)), int(m.group(2)),
m.group(3))
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11911
Default Alt Text
wikipedia.patch (878 B)
Attached To
Mode
T57673: Migrate "DrTrigon's tools" (pywikibot/bots/drtrigonbot) bugs from JIRA (TS) to Bugzilla (set up product etc)
Attached
Detach File
Event Timeline
Log In to Comment