Skip to content

Commit

Permalink
feat(parse): Added twitch as a video provider (Issue #349, #348)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyTheFactory committed Nov 17, 2023
1 parent 4aebf29 commit f4d8f0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion newspaper/extractors/videos_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from newspaper.utils.classes import Video

VIDEOS_TAGS = ["iframe", "embed", "object", "video"]
VIDEO_PROVIDERS = ["youtube", "vimeo", "dailymotion", "kewego"]
VIDEO_PROVIDERS = ["youtube", "vimeo", "dailymotion", "kewego", "twitch"]


class VideoExtractor:
Expand Down
4 changes: 2 additions & 2 deletions newspaper/outputformatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def remove_negativescores_nodes(self):
item.getparent().remove(item)

def remove_empty_tags(self):
"""It's common in top_node to exit tags that are filled with data
within properties but not within the tags themselves, delete them
"""It's common in top_node to have tags that are filled with data
in their properties but do not have any displayable text.
"""
all_nodes = parsers.get_tags(self.get_top_node())
all_nodes.reverse()
Expand Down

0 comments on commit f4d8f0f

Please sign in to comment.