Open 520rahul opened 2 months ago
@520rahul Currently, the project supports booking for only one passenger, but we can add support for multiple passengers in the future. If you'd like to contribute, feel free to do so!
To run this repository, you need to install the dependencies, Tesseract, the npm module Puppeteer, and Jimp.
@Zaidkhalid44 can u please explain me step by step process as i m techically not advanced
Install Node.js: Download and install the LTS version from the Node.js official website.
Install Puppeteer and Jimp:
npm install puppeteer jimp
Install Tesseract OCR:
Follow the installation instructions on the Tesseract GitHub Wiki for your operating system (Windows, macOS, Linux).
Verify the installation by running:
tesseract -v
Install Node.js: Download and install the LTS version from the Node.js official website.
Install Puppeteer and Jimp:
npm install puppeteer jimp
Install Tesseract OCR:
Follow the installation instructions on the Tesseract GitHub Wiki for your operating system (Windows, macOS, Linux). Verify the installation by running:
tesseract -v
@Zaidkhalid44 i have followed all your instructions, now please guide how to run the repo
@520rahul
git clone https://github.com/Zaidkhalid44/IRCTC.git
cd IRCTC
npm install
node main.js
This will start the automated ticket booking process.
Make sure to configure any necessary settings in config.json
before running the script.
@520rahul
Prerequisites
- Install Node.js: Ensure Node.js (v14.x or higher) and npm (v6.x or higher) are installed on your system. You can download Node.js from nodejs.org.
- Install Tesseract: Download and install Tesseract OCR software from here.
- Ensure Puppeteer and Jimp are available: These will be installed as part of the project's dependencies.
Installation
- Clone the repository:
git clone https://github.com/Zaidkhalid44/IRCTC.git
- Navigate to the project directory:
cd IRCTC
- Install the dependencies:
npm install
Running the Script
Run the main automation script:
node main.js
This will start the automated ticket booking process.
Make sure to configure any necessary settings in
config.json
before running the script.
@Zaidkhalid44 below error is coming while login in:- Attempt 1 to solve captcha Waiting for captcha image... Captcha image found, downloading... Captcha image downloaded. Image processed. Error executing Tesseract: Error: Command failed: tesseract ./captcha.png stdout -l eng --psm 7 'tesseract' is not recognized as an internal or external command, operable program or batch file.
node:internal/errors:984 const err = new Error(message); ^
Error: Command failed: tesseract ./captcha.png stdout -l eng --psm 7 'tesseract' is not recognized as an internal or external command, operable program or batch file.
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:519:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
code: 1, killed: false, signal: null, cmd: 'tesseract ./captcha.png stdout -l eng --psm 7'
@Zaidkhalid44 one more request to update repo to book more then 1 passenger
@520rahul The error you're encountering indicates that the Tesseract OCR executable (tesseract) is not installed or not recognized by your system's PATH. To solve this issue, you need to install Tesseract OCR and ensure that it is accessible from the command line.
watch out this: https://www.youtube.com/watch?v=2kWvk4C1pMo&t=52s
And I appreciate your feedback and will add the feature to book tickets for multiple passengers soon. Stay tuned for the update, and thank you for using the tool!
@Zaidkhalid44 Dear please guide how to install and run rwpo on windows and how to book ticket for more then 1 person