[twitter] fix crash due to missing 'source' (#4620)

regression caused by 06aaedde
pull/4667/head
Mike Fährmann 12 months ago
parent 85357c1ef8
commit efaab4fbfa
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -451,6 +451,7 @@ class TwitterExtractor(Extractor):
"id_str": id_str,
"lang": None,
"user": user,
"source": "><",
"entities": {},
"extended_entities": {
"media": [

@ -6,4 +6,4 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
__version__ = "1.26.0"
__version__ = "1.26.1-dev"

@ -254,10 +254,9 @@ __tests__ = (
"#category": ("", "twitter", "tweet"),
"#class" : twitter.TwitterTweetExtractor,
"content": r"""re:Gear up for #PokemonSwordShieldEX with special Mystery Gifts!
Youll be able to receive four Galarian form Pokémon with Hidden Abilities, plus some very useful items. Its our \(Mystery\) Gift to you, Trainers!
"source" : "Sprinklr",
"content": r"""re:Gear up for #PokemonSwordShieldEX with special Mystery Gifts! \n
Youll be able to receive four Galarian form Pokémon with Hidden Abilities, plus some very useful items. Its our \(Mystery\) Gift to you, Trainers! \n
🎁 """,
},
@ -482,8 +481,9 @@ Youll be able to receive four Galarian form Pokémon with Hidden Abilities, p
"#comment" : "age-restricted (#2354)",
"#category": ("", "twitter", "tweet"),
"#class" : twitter.TwitterTweetExtractor,
"#options" : {"syndication": True},
"#count" : 1,
"#exception": exception.AuthorizationError,
"#options" : {"syndication": True},
"#count" : 1,
"date": "dt:2022-02-13 20:10:09",
},
@ -513,10 +513,8 @@ Youll be able to receive four Galarian form Pokémon with Hidden Abilities, p
"#category": ("", "twitter", "tweet"),
"#class" : twitter.TwitterTweetExtractor,
"content": """BREAKING - DEADLY LIES: Independent researchers at Texas A&M University have just contradicted federal government regulators, saying that toxic air pollutants in East Palestine, Ohio, could pose long-term risks.
The Washington Post writes, "Three weeks after the toxic train derailment in Ohio, an analysis of Environmental Protection Agency data has found nine air pollutants at levels that could raise long-term health concerns in and around East Palestine, according to an independent analysis.
"content": """BREAKING - DEADLY LIES: Independent researchers at Texas A&M University have just contradicted federal government regulators, saying that toxic air pollutants in East Palestine, Ohio, could pose long-term risks. \n
The Washington Post writes, "Three weeks after the toxic train derailment in Ohio, an analysis of Environmental Protection Agency data has found nine air pollutants at levels that could raise long-term health concerns in and around East Palestine, according to an independent analysis. \n
"The analysis by Texas A&M University seems to contradict statements by state and federal regulators that air near the crash site is completely safe, despite residents complaining about rashes, breathing problems and other health effects." Your reaction.""",
},

Loading…
Cancel
Save