We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8dc0470 commit 0bc6feeCopy full SHA for 0bc6fee
1 file changed
app/services/scrapers/twitter/__init__.py
@@ -116,9 +116,14 @@ def _process_tweet(self, tweet_data: Dict):
116
self._process_tweet_Twitter154(tweet_data)
117
118
def _process_tweet_twitter135(self, tweet_data: Dict):
119
- entries = tweet_data["data"]["threaded_conversation_with_injections_v2"][
+ tweet_data_instructions = tweet_data["data"]["threaded_conversation_with_injections_v2"][
120
"instructions"
121
- ][0]["entries"]
+ ]
122
+ entries_instruction = next(
123
+ (instr for instr in tweet_data_instructions if 'entries' in instr),
124
+ None
125
+ )
126
+ entries = entries_instruction['entries']
127
tweets = []
128
for i in entries:
129
if (
0 commit comments