我在 2 天內用 Apify 建立 3 個 Telegram 擷取工具:遇到的問題
I built 3 Telegram scrapers on Apify in 2 days. Here is what broke.
作者在 2 天內於 Apify Store 發佈 3 個 Telegram Actor,分別用於頻道分析、關鍵字監察與相似頻道搜尋;目前沒有付費用戶,收入為 $0,測試運行約花費 $0.05。文章記錄空白測試結果、重複收費、Webhook 阻塞及商店搜尋未顯示新 Actor 等問題,並列出修正方式。
I trade crypto and write small bots in Python. Last week I wanted a side project that can earn something without clients and chats, so I tried Apify Store. In two days I published three Actors for Telegram. I used an AI coding assistant for most of the code, and I tested and published everything myself.
This post is not a success story. I have zero paying users today. It is a list of what I built, what broke, and what I learned.
The idea: no login, no API keys
Every public Telegram channel has a web preview at t.me/s/channelname. It is plain HTML: posts, views, reactions, subscriber count. You don't need a Telegram account, a phone number or the official API.
So all three Actors use only httpx and BeautifulSoup. No browser. A run takes 5 to 15 seconds and costs almost nothing in compute.
What I built
1. Telegram Channel Analytics. You give it channels, it returns subscribers, average and median views, view rate (views divided by subscribers), posts per day, best hour to post, top posts and the channels it mentions or reposts.
A real result from my tests:
| Channel | Subscribers | Avg views | View rate |
|---|---|---|---|
| Pavel Durov | 9.9M | 6.0M | 60.9% |
| Telegram News | 9.07M | 2.5M | 27.9% |
| BBC News Russian | 389K | 52.6K | 13.5% |
View rate is the useful number. If a channel has 200K subscribers and 2% view rate, somebody bought those subscribers.
2. Telegram Keyword Monitor & Alerts. It watches a list of channels for keywords, tickers like $SOL or contract addresses, and sends new matches to Telegram, Slack, Discord or a webhook. It remembers the last post it saw, so a scheduled run returns only new posts.
3. Telegram Similar Channels Finder. You give it one channel, it reads who that channel mentions and reposts, checks which of those are real public channels, and ranks them.
What broke
1. An empty result is a failed test
Apify runs every public Actor once a day with the default input. If the run returns nothing, the test fails. After three days my monitor got an "Under maintenance" label and I got an email.
My default input was two quiet channels and two rare keywords. No new posts, no rows, test failed. And because the monitor remembers what it saw, every run after the first one was empty by design.
The fix was two things. I changed the default channels to busy ones. And when there are no new matches, the Actor now writes one free status row: "No new matching posts since the last run."
Lesson: test your Actor with the default input, twice in a row, before you publish.
2. I charged twice for the same channel
Input telegram and TELEGRAM was treated as two channels. Two requests, two charges. Usernames in Telegram are not case sensitive, so now I compare them in lower case.
3. One broken webhook blocked the others
All alert destinations were in one try block. A bad Slack URL raised an error, and the webhook for the same post was never called. Now every destination is sent separately, and a broken one is switched off for the rest of the run with a clear message in the log.
4. Pay per event has a trap
Apify adds a default price for every row in the dataset. My Actors also write error rows, for example "channel not found". With the default event, users would pay for errors. I removed it and charge only my own events: one per analyzed channel, one per matching post.
5. The Store does not show new Actors in search
This was the biggest surprise. I thought the Store would bring users. It does not, at least not at the start. Apify wrote on their blog that search now prefers Actors with real usage, and a new Actor may not appear even for its exact name. Mine don't. I checked eight queries.
So you need the first users from outside the Store. That is one reason I am writing this post.
6. One idea died before I started
My third Actor was going to be trending TikTok sounds. I checked first: the public Creative Center page now shows three hashtags and a login button, and the music trends are gone. I am glad I checked before writing code.
Numbers so far
- 3 Actors published
- 2 days of work
- 6 "total users" on my profile, and I think most of them are me and the automated tests
- $0 earned
- about $0.05 spent on test runs
What I would do differently
- Check how the Store search works before choosing the niche.
- Run the default input twice before publishing.
- Write tests with bad input on day one: duplicates, wrong URLs, bots, private channels.
- Plan where the first ten users will come from before writing the first line.
Links
If you work with Telegram channels, try them and tell me what is wrong. Bug reports are welcome.
I will post an update in a month with real numbers, good or bad.
來源:DEV Community · dev.to