Skip to content

Commit

Permalink
fixed some problems
Browse files Browse the repository at this point in the history
  • Loading branch information
zombyacoff committed Dec 23, 2024
1 parent 320c391 commit 3721b1a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 50 deletions.
44 changes: 0 additions & 44 deletions examples/lp_parser.py

This file was deleted.

8 changes: 4 additions & 4 deletions examples/media_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@


class MediaParser(TelegraphParser):
async def parse(self):
self.article = self.url.split("/")[-1]
images = self.get_urls(self.soup.find_all("img"))
videos = self.get_urls(self.soup.find_all("video"))
async def parse(self, url, soup):
self.article = url.split("/")[-1]
images = self.get_urls(soup.find_all("img"))
videos = self.get_urls(soup.find_all("video"))

if images:
await self.download_media(images, "images", "gif")
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def get_requirements(file_name: str = "requirements.txt") -> list[str]:
author_email="zombyacoff@gmail.com",
url="https://github.com/zombyacoff/tu-parser",
description="A flexible module for building custom parsers for the Telegraph website",
long_description=dedent(f"""\
long_description=dedent("""\
# Telegraph Universal Parser
**Telegraph Universal Parser (tu-parser)** is a flexible module designed for creating custom parsers for the [Telegraph]({tuparser.TELEGRAPH_URL}) website.
**Telegraph Universal Parser (tu-parser)** is a flexible module designed for creating custom parsers for the [Telegraph](https://telegra.ph) website.
"""),
long_description_content_type="text/markdown",
packages=["tuparser"],
Expand Down

0 comments on commit 3721b1a

Please sign in to comment.