Comments (6)
Now links parsing works like a charm! thank you 🙏
from accless-tg-scraper.
Hi, could you provide me with some links to the Telegram posts where the problems appear?
from accless-tg-scraper.
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.
You can try now
from accless-tg-scraper.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from accless-tg-scraper.