chupapee / social-media-downloader-bot

📥 Bot for downloading any media from Instagram, Twitter and videos from TikTok and Youtube
https://t.me/insta_twitter_youtube_bot
32 stars 19 forks source link

Would like to know how to configure it to make it work. #3

Closed thelittlerocket closed 8 months ago

thelittlerocket commented 8 months ago

Hey there,

I got lots of error messages but I can't figure out what I missed, can you point out what I have missed? thanks. Neither YouTube, twitter, or Instagram can downloaded. any help would be really appreciated.

root@relieved-cash:~/social-media-downloader-bot# docker run --name bot --restart unless-stopped social-media-downloader
yarn run v1.22.19
$ node dist/index.js
Error: No element found for selector: button[type="submit"]
    at /usr/src/bots/social-media-bot/dist/entities/instagram/api/instagramApi.js:43:19
    at Generator.throw (<anonymous>)
    at rejected (/usr/src/bots/social-media-bot/dist/entities/instagram/api/instagramApi.js:6:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) insta error
Error: No element found for selector: #sf_submit
    at /usr/src/bots/social-media-bot/dist/entities/youtube/api/youtubeApi.js:41:19
    at Generator.throw (<anonymous>)
    at rejected (/usr/src/bots/social-media-bot/dist/entities/youtube/api/youtubeApi.js:6:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) puppeeter page preparing failed
Error: No element found for selector: #sf_submit
    at /usr/src/bots/social-media-bot/dist/entities/youtube/api/youtubeApi.js:41:19
    at Generator.throw (<anonymous>)
    at rejected (/usr/src/bots/social-media-bot/dist/entities/youtube/api/youtubeApi.js:6:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) puppeeter page preparing failed
Error: No element found for selector: #sf_submit
    at /usr/src/bots/social-media-bot/dist/entities/youtube/api/youtubeApi.js:41:19
    at Generator.throw (<anonymous>)
    at rejected (/usr/src/bots/social-media-bot/dist/entities/youtube/api/youtubeApi.js:6:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) puppeeter page preparing failed
Error: parsing page failed
    at /usr/src/bots/social-media-bot/dist/scenes/youtube/index.js:27:23
    at Generator.next (<anonymous>)
    at fulfilled (/usr/src/bots/social-media-bot/dist/scenes/youtube/index.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
TelegramError: 400: Bad Request: message to delete not found
    at Telegram.callApi (/usr/src/bots/social-media-bot/node_modules/telegraf/lib/core/network/client.js:293:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  response: {
    ok: false,
    error_code: 400,
    description: 'Bad Request: message to delete not found'
  },
  on: {
    method: 'deleteMessage',
    payload: { chat_id: < redacted >, message_id: 28 }
  }
}

.env file

PROD_BOT_TOKEN=< redacted >
DEV_BOT_TOKEN=< redacted >

BOT_ADMIN_ID=< redacted >

# scraping page urls
TWITTER_PAGE_URL=https://ssstwitter.com/
INSTA_PAGE_URL=https://snapinsta.app/
YOUTUBE_PAGE_URL=https://en.savefrom.net/
TIKTOK_PAGE_URL=https://snaptik.app/

# firebase config variables for analytics data collection
FIREBASE_API_KEY=
MESSAGING_SENDER_ID=
APP_ID=
MEASUREMENT_ID=

NODE_ENV=development
chupapee commented 8 months ago

Hi! The bot's functionality relies on web scraping, a technique that involves emulating user behavior to extract data from a website by interacting with its DOM elements. The error you're seeing, "No element found for selector: button[type="submit"]," basically means the bot is looking for a button with a specific type, but the website's structure has evolved. As a result, the button might no longer have the same type attribute or might even be represented by a different HTML tag. All the other errors popped up because of the same issue