[twitter] restore errors for protected timelines etc (fixes #2237)
This commit is contained in:
@@ -1083,13 +1083,15 @@ class TwitterAPI():
|
|||||||
instructions = (data["user"]["result"]["timeline"]
|
instructions = (data["user"]["result"]["timeline"]
|
||||||
["timeline"]["instructions"])
|
["timeline"]["instructions"])
|
||||||
else:
|
else:
|
||||||
|
instructions = data
|
||||||
for key in path:
|
for key in path:
|
||||||
data = data[key]
|
instructions = instructions[key]
|
||||||
instructions = data["instructions"]
|
instructions = instructions["instructions"]
|
||||||
|
|
||||||
entries = instructions[0]["entries"]
|
entries = instructions[0]["entries"]
|
||||||
except (KeyError, IndexError):
|
except (KeyError, IndexError):
|
||||||
return
|
self.extractor.log.debug(data)
|
||||||
|
raise exception.StopExtraction("Unable to retrieve Tweets")
|
||||||
|
|
||||||
tweets = []
|
tweets = []
|
||||||
tweet = cursor = None
|
tweet = cursor = None
|
||||||
|
|||||||
Reference in New Issue
Block a user