Flameish / Novel-Grabber

Novel-Grabber can download novels from pretty much any webnovel and lightnovel site.
MIT License
481 stars 63 forks source link

[BUG] Telegram Bot not working #284

Open Priyal65 opened 3 years ago

Priyal65 commented 3 years ago

Novel-grabber (novelly) telegram bot has stopped working

Flameish commented 3 years ago

SD card it ran on died.

Priyal65 commented 3 years ago

Will you be replacing the SD card? If yes, then when?

Flameish commented 3 years ago

I think I will take the occasion to shut the public bot down.

JoyceEstrada13 commented 3 years ago

hello. Can we still use the application (for pc)? Or connect it with our bot?

Flameish commented 3 years ago

I will just shut down Novelly (my own bot). Anyone can create their own bot. There is a section on the readme on how to do it.

christianapeach commented 3 years ago

Please no . Can you please dont do it because other people who dont know how to create including myself own bot it will difficult but it's still your decision.

Flameish commented 3 years ago

It's actually pretty easy:

  1. Create a bot by talking to the @BotFather bot on Telegram and copy your API token.
  2. Download, extract and open the desktop application of Novel-Grabber.
  3. Go to Telegram Bot settings and paste your Telegram API token. Adjust settings to your liking and click save. Screenshot from 2021-09-09 12-58-17

At this point you could press start and the bot should work but only while the program window is open and running. You probably want to have it run from a home server or a PC which is always on, just copy the whole Novel-Grabber folder to it and start the bot from the Terminal/Powershell/CMD:

java -jar Novel-Grabber.jar -telegramBot
JoyceEstrada13 commented 3 years ago

Thank you for the tutorial!! I try it and its working.

christianapeach commented 3 years ago

I copied Api token but cant figure it out

Flameish commented 3 years ago

I need some more info here, what can't you figure out? Which step are you?

KatSaw commented 3 years ago

Hi, is there really no chance for you to reactivate the bot again? I tried to create my own bot as you've said but my Macbook seems to not allow me to open the Novel Grabber desktop application, I couldn't change any settings as I'm not the admin of this Macbook. Please please reconsider since I love this bot very much as it's very convenient.

Flameish commented 3 years ago

You probably want to host it on a server anyway since the program needs to run continuously to handle the requests, which is one of the reasons for shutting it down: Hosting costs. To be fair it's not much right now but with 250+ active users, I would need to start looking for hosting options on a proper server. The second reason is that I'm not sure about the legal standpoint for running a public one.

Priyal65 commented 3 years ago

It's actually pretty easy:

  1. Create a bot by talking to the @BotFather bot on Telegram and copy your API token.
  2. Download, extract and open the desktop application of Novel-Grabber.
  3. Go to Telegram Bot settings and paste your Telegram API token. Adjust settings to your liking and click save. Screenshot from 2021-09-09 12-58-17

At this point you could press start and the bot should work but only while the program window is open and running. You probably want to have it run from a home server or a PC which is always on, just copy the whole Novel-Grabber folder to it and start the bot from the Terminal/Powershell/CMD:

java -jar Novel-Grabber.jar -telegramBot

Hi, I followed your steps till the extraction, but after that I am not able to open the dekstop application, can you please tell me where am I going wrong After clicking Novel-Grabber.jar or NG-Launcher.jar , it just opens it like it's a folder instead of an application. I am using Linux btw and I tried opening the .jar files using 'Archive Manager'

christianapeach commented 3 years ago

I need some more info here, what can't you figure out? Which step are you?

I find telegram api token and entered it. Max chapter 1500. Per novel 2000. Wait time 0 .clicked start . It shows running . Sorry for late replying .

Flameish commented 3 years ago

@christianapeach did you click save first? Also you might wanna start it from the console, you get more info that way. Same goes for @Priyal65, see the code snippet. Go inside the bin folder of Novel Grabber and open a terminal window and enter java -jar Novel-Grabber.jar to get the GUI.

christianapeach commented 3 years ago

Yes i did

Priyal65 commented 3 years ago

@christianapeach did you click save first? Also you might wanna start it from the console, you get more info that way. Same goes for @Priyal65, see the code snippet. Go inside the bin folder of Novel Grabber and open a terminal window and enter java -jar Novel-Grabber.jar to get the GUI.

I did what you said and the terminal shows me this error IMG_20210911_003821_910 What should I do next?

Flameish commented 3 years ago

I'm not quite sure, I think you have the headless version of java installed, it doesn't have the graphical element libraries. Try installing full java:

sudo apt install default-jre
Priyal65 commented 3 years ago

I'm not quite sure, I think you have the headless version of java installed, it doesn't have the graphical element libraries. Try installing full java:


sudo apt install default-jre
It says that default jre is already installed and is the newest version.

I think I might have messed up somewhere in the process ,I will just summarise what I have done until now and you can tell me if I messed up somewhere

  1. I downloaded the zip file
  2. I extracted it and opened it
  3. I clicked on NG-Launcher.jar but it opened (using the pre installed 'Archive Manager') like a folder instead of showing any GUI
  4. So, I right clicked and chose 'Open in terminal' and typed 'java -jar NG-Launcher.jar' . But it showed some errors again
  5. Same thing happened when I did it inside bin on Novel-Grabber.jar (Image in previous reply)
Flameish commented 3 years ago

That shouldn't matter. The error indicates that some kind of java library is missing. Maybe try googling and see if you can find anything concerning that UnstatisfiedLinkError. The only thing I can still think of is trying to install the default-jdk (development kit instead of the previous run time evrionment).

Priyal65 commented 3 years ago

That shouldn't matter. The error indicates that some kind of java library is missing. Maybe try googling and see if you can find anything concerning that UnstatisfiedLinkError. The only thing I can still think of is trying to install the default-jdk (development kit instead of the previous run time evrionment).

Thank you for your time! It finally worked. Your previous guess was spot on I had a headless version of Java. I had to search 'How to identify if a application is headless'

damare01 commented 3 years ago

You probably want to host it on a server anyway since the program needs to run continuously to handle the requests, which is one of the reasons for shutting it down: Hosting costs. To be fair it's not much right now but with 250+ active users, I would need to start looking for hosting options on a proper server. The second reason is that I'm not sure about the legal standpoint for running a public one.

You can try hosting it on heruko

saphiejie commented 3 years ago

It's actually pretty easy:

  1. Create a bot by talking to the @BotFather bot on Telegram and copy your API token.
  2. Download, extract and open the desktop application of Novel-Grabber.
  3. Go to Telegram Bot settings and paste your Telegram API token. Adjust settings to your liking and click save. Screenshot from 2021-09-09 12-58-17

At this point you could press start and the bot should work but only while the program window is open and running. You probably want to have it run from a home server or a PC which is always on, just copy the whole Novel-Grabber folder to it and start the bot from the Terminal/Powershell/CMD:

java -jar Novel-Grabber.jar -telegramBot

is it possible for you to make an elaborate explanation? I got lost at extraction

saphiejie commented 3 years ago

That shouldn't matter. The error indicates that some kind of java library is missing. Maybe try googling and see if you can find anything concerning that UnstatisfiedLinkError. The only thing I can still think of is trying to install the default-jdk (development kit instead of the previous run time evrionment).

Thank you for your time! It finally worked. Your previous guess was spot on I had a headless version of Java. I had to search 'How to identify if a application is headless'

is it possible for you to make an elaborate explanation? I've been trying for the past hour but I cant get it to work

saphiejie commented 3 years ago

It's actually pretty easy:

  1. Create a bot by talking to the @BotFather bot on Telegram and copy your API token.
  2. Download, extract and open the desktop application of Novel-Grabber.
  3. Go to Telegram Bot settings and paste your Telegram API token. Adjust settings to your liking and click save. Screenshot from 2021-09-09 12-58-17

At this point you could press start and the bot should work but only while the program window is open and running. You probably want to have it run from a home server or a PC which is always on, just copy the whole Novel-Grabber folder to it and start the bot from the Terminal/Powershell/CMD:

java -jar Novel-Grabber.jar -telegramBot

WAIT I GOT IT, do i need to keep the novel-grabber open all the time so it would work?

Flameish commented 3 years ago

At this point you could press start and the bot should work but only while the program window is open and running. You probably want to have it run from a home server or a PC which is always on

saphiejie commented 3 years ago

At this point you could press start and the bot should work but only while the program window is open and running. You probably want to have it run from a home server or a PC which is always on

did you use python on editing the bot?

christianapeach commented 3 years ago

@Flameish Hi i have copied api token and pasted it. Max chap per day 1500, per novel 2500 , wait time 0 concurrent download 1. Clicked save later start. It shows status as running but when i paste the link in novelly it didn't download. What i have to do or something i did wrong?

saphiejie commented 3 years ago

@Flameish Hi i have copied api token and pasted it. Max chap per day 1500, per novel 2500 , wait time 0 concurrent download 1. Clicked save later start. It shows status as running but when i paste the link in novelly it didn't download. What i have to do or something i did wrong?

pretty sure you're not supposed to copy link it into novelly, but to your own bot.

christianapeach commented 3 years ago

@Flameish Hi i have copied api token and pasted it. Max chap per day 1500, per novel 2500 , wait time 0 concurrent download 1. Clicked save later start. It shows status as running but when i paste the link in novelly it didn't download. What i have to do or something i did wrong?

pretty sure you're not supposed to copy link it into novelly, but to your own bot.

Thanks i tried it but didn't work.

graciagraciagracia commented 3 years ago

How to host telegram bot using android phone? Is it possible???

Flameish commented 3 years ago

did you use python on editing the bot?

@saphiejie I don't quite understand the question. Novel-Grabber is written in Java.

@christianapeach There should be 2 log files, one in the bin folder and one in the telegram folder. Please check them.

@graciagraciagracia It's not possible, that's why the Telegram bot exists.

saphiejie commented 3 years ago

did you use python on editing the bot?

@saphiejie I don't quite understand the question. Novel-Grabber is written in Java.

@christianapeach There should be 2 log files, one in the bin folder and one in the telegram folder. Please check them.

@graciagraciagracia It's not possible, that's why the Telegram bot exists.

mn, yes. haha. how did you make the commands though? and the responds?

Flameish commented 3 years ago

If you are talking about the / commands, you need to set them up with BotFather. Here are the possible commands Novel-Grabber can understand:

/info (is the same as /start)
/sources
/cli
/limits
/updateVips
/stop

The input for /info command is read from a file called info.txt inside the telegram folder which you can create.

saphiejie commented 3 years ago

If you are talking about the / commands, you need to set them up with BotFather. Here are the possible commands Novel-Grabber can understand:

/info (is the same as /start)
/sources
/cli
/limits
/updateVips
/stop

The input for /info command is read from a file called info.txt inside the telegram folder which you can create.

tHANK YOU!!! ONE last question. is It possible for me to deploy it to heroku, since its basically not mine or nah cause it won't' work?

Flameish commented 3 years ago

I don't know if it works, but feel free to report back how it went!

budikesuma commented 3 years ago

tHANK YOU!!! ONE last question. is It possible for me to deploy it to heroku, since its basically not mine or nah cause it won't' work?

@Flameish, @saphiejie, Sure, Heroku support deploys the java app.

The tutorial assumes that you already have:

  1. A free Heroku account
  2. Java 8 installed
  3. Maven 3 installed

Here you go: https://devcenter.heroku.com/articles/getting-started-with-java?singlepage=true

ChenMei7000 commented 3 years ago

It's actually pretty easy:

  1. Create a bot by talking to the @BotFather bot on Telegram and copy your API token.
  2. Download, extract and open the desktop application of Novel-Grabber.
  3. Go to Telegram Bot settings and paste your Telegram API token. Adjust settings to your liking and click save. Screenshot from 2021-09-09 12-58-17

At this point you could press start and the bot should work but only while the program window is open and running. You probably want to have it run from a home server or a PC which is always on, just copy the whole Novel-Grabber folder to it and start the bot from the Terminal/Powershell/CMD:

java -jar Novel-Grabber.jar -telegramBot

Can you tell me what to do after this? I tried copy pasting the link on the telegram bot I made but it says that 'host not supported'. I was pretty sure that Chrysanthemum Garden was one of the sources available?

Flameish commented 3 years ago

CG works fine for me. What did you enter?

ChenMei7000 commented 3 years ago

I entered the link of the novel from CG to the telegram bot I created.

Flameish commented 3 years ago

Try sending this to test with: -link https://host.com/novel-toc/ -chapters 1 1 Please send the corresponding logs if it doesn't work.

ChenMei7000 commented 3 years ago

![Uploading Screenshot_20211013_073206_org.telegram.messenger.jpg…]()

ChenMei7000 commented 3 years ago

![Uploading IMG_20211013_072738.jpg…]() ![Uploading IMG_20211013_072748.jpg…]()

here

Flameish commented 3 years ago

I can't see the pictures you posted.

ChenMei7000 commented 3 years ago

WAHHH IT'S OKAY NOW! THANK U SO MUCH. Sorry for the trouble, I installed the wrong one 😅 No wonder it didn't work. Thank U! 🥰

Emasoft commented 3 years ago

@ChenMei7000 Can you post the link to your bot channel?

josephfrances123 commented 2 years ago

So, please correct me if I'm wrong.. If I'll close the Novel-Grabber program.. My telegram bot won't work? I don't have any idea about programming and stuffs so forgive me hehe