Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 626db1b

Browse files
committed
drop support of deprecated /labs/ and replace it with v2
1 parent 5a11a30 commit 626db1b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

twitter/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def _handle_response(self, req, uri, arg_data, _timeout=None):
393393
data = f.read()
394394
if len(data) == 0:
395395
return wrap_response({}, handle.headers)
396-
elif "json" == self.format or "/labs/" in uri:
396+
elif "json" == self.format or uri.startswith("2/"):
397397
try:
398398
res = json.loads(data.decode('utf8'))
399399
except json.decoder.JSONDecodeError as e:

0 commit comments

Comments
 (0)