Steps to Reproduce
Run the following code snippet:
import pywikibot
site = pywikibot.Site()
page = pywikibot.Page(site, "Are_You_Experienced")
img_links = list(page.imagelinks())
print(img_links[4].title(as_filename=True, with_ns=False))
Expected Result
'An_excerpt_from__Third_Stone_from_the_Sun__by_the_Jimi_Hendrix_Experience,_1967.ogg'
Actual Result
'An_excerpt_from_"Third_Stone_from_the_Sun"_by_the_Jimi_Hendrix_Experience,_1967.ogg'
Notes
Most likely, the problem is with this line, where we don't account for "\"" character:
https://github.com/wikimedia/pywikibot/blob/23dcbe6b12d6451e6c8e51d9af00c91a9c943f04/pywikibot/page.py#L377
System Info
- Windows 10 Home
- Python 3.6.5 :: Anaconda, Inc.
- UNKNOW (fetched via pip install git+https://gerrit.wikimedia.org/r/pywikibot/core.git)