Page MenuHomePhabricator

Extracts API returning invalid JSON for Telugu Wikipedia
Closed, DuplicatePublic

Description

When I access this API url with Python's urlopen, I get an unloadable JSON string that ends with the invalid bytes: \x85\x016\x9b\x7f\x00\x00.

Just try:

import json
from urllib2 import urlopen

resp_bytes = urlopen(URL_FROM_LINK_ABOVE).read()

# uncomment the following to see the exact error
# json.loads(resp_bytes)

The response is also a rather suspicious length: 32,768 bytes. Tested on Python 2.7.6 and 2.7.5 on Ubuntu 14.04 and Debian 6.0.8.

Thanks in advance!

Event Timeline

mahmoud created this task.May 9 2016, 2:48 AM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 9 2016, 2:48 AM
MaxSem edited projects, added TextExtracts; removed Web-APIs-Hub.May 9 2016, 2:52 AM