Bugs item #2928239, was opened at 2010-01-08 13:39 Message generated for change (Comment added) made by xqt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2928239...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: None
Status: Pending Resolution: Wont Fix
Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody)
Assigned to: xqt (xqt)
Summary: unwarranted SectionError
Initial Comment:
python version.py
Pywikipedia [http] trunk/pywikipedia (r7865, 2010/01/08, 07:29:30) Python 2.5.2 (r252:60911, Jan 4 2009, 17:40:26) [GCC 4.3.2]
On en.wikisource.org, this link:
[[Energy Independence and Security Act of 2007/Title XII#Sec. 1201.]]
generates a SectionError, making page.exists() return False, despite the section being good (try pasting the link into the search line an press "Go"). Possibly pywikipedia is confused by the long and short section IDs (the generated HTML code contains both
<span class="mw-headline" id="Sec._1201._Express_Loans_for_Renewable_Energy_and_Energy_Efficiency.">
and
<span id="Sec._1201.">
where the second span element is a subelement of the first one, so the CSS attribute class="mw-headline" still applies).
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-01-18 17:28
Message: We do not get this section neither via wikitext nor via api parse action. I would not do some screen scrapping to get this stuff.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody) Date: 2010-01-18 11:37
Message: It seems wikipedia.py uses the wikitext to search for sections instead of the rendered HTML. This makes this bug difficult to fix for pages in which sections are generated by remplates or anchors are defined manually.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2928239...
pywikipedia-bugs@lists.wikimedia.org