Git Product home page Git Product logo

Comments (6)

progressionnetwork avatar progressionnetwork commented on July 18, 2024 1

Now links parsing works like a charm! thank you 🙏

from accless-tg-scraper.

Kisspeace avatar Kisspeace commented on July 18, 2024

Hi, could you provide me with some links to the Telegram posts where the problems appear?

from accless-tg-scraper.

progressionnetwork avatar progressionnetwork commented on July 18, 2024

Hi, try for example https://t.me/cryptonews/3888. It will detect all links as text 'link'. But as I see, for markdown it should extract link like a link ?

from accless-tg-scraper.

Kisspeace avatar Kisspeace commented on July 18, 2024

You can try now

from accless-tg-scraper.

progressionnetwork avatar progressionnetwork commented on July 18, 2024

Just tried. Seems like the result is not changed. Let me describe in details:
When in author's telegram channel post used text with link (href) then your parser handle it as text but not as link.
Better if it will handle like a text_of_link.

from accless-tg-scraper.

Kisspeace avatar Kisspeace commented on July 18, 2024
Example for https://t.me/cryptonews/3888:
import asyncio
from accless_tg_scraper.parser import *
from accless_tg_scraper.client import *
from accless_tg_scraper.classes import *
from accless_tg_scraper.serialize.markdown import *

async def main():
    telegram = TgScraper()
    post = await telegram.get_post('cryptonews', 3888)
    # md_text is a content converted to markdown, like on a web page.
    # Using dump_content function from accless_tg_scraper.serialize.classes
    md_text = dump_content(post.content, post.entities, RULE_SET_MD)
    print(md_text)
if __name__ == '__main__':
    asyncio.run(main())

md_text will be:

Someone created fake news that BlackRock plans to acquire Voyager Digital to pump tokens. The Associated Press website even published it with paid content. The social media source marked in the press release is a Chinese account with only one fan. VGX has gained 8% in the last 24 hours. — link

from accless-tg-scraper.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.