Skip to content

Commit

Permalink
defaulting to python for windows and readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamguys committed Apr 18, 2024
1 parent 07a4204 commit 33566c1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
11 changes: 9 additions & 2 deletions cypress/fixtures/passenger_data.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"TRAIN_NO": "12559",
"TRAIN_COACH": "SL",
"TRAVEL_DATE": "18/04/2024",
"TRAVEL_DATE": "18/05/2024",
"SOURCE_STATION": "BSBS",
"BOARDING_STATION": null,
"DESTINATION_STATION": "NDLS",
"TATKAL": false,
"PREMIUM_TATKAL": true,
"PREMIUM_TATKAL": false,
"UPI_ID_CONFIG": "",
"PASSENGER_DETAILS": [
{
Expand All @@ -15,6 +15,13 @@
"GENDER": "Male",
"SEAT": "No Preference",
"FOOD": "No Food"
},
{
"NAME": "Random name",
"AGE": 26,
"GENDER": "Female",
"SEAT": "No Preference",
"FOOD": "No Food"
}
],
"__valid_coaches__": "SL | 2A | 3A | 3E | 1A | CC | EC | 2S",
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function performLogin(LOGGED_IN) {
cy.get('.captcha-img').invoke('attr', 'src').then((value) => {
// api call to retrieve captcha value

cy.exec(`python3 irctc-captcha-solver/app.py "${value}"`).then((result) => {
cy.exec(`python irctc-captcha-solver/app.py "${value}"`).then((result) => {
cy.get('#captcha').clear().type(result.stdout).type('{enter}');
// cy.contains('SIGN IN').click()

Expand Down Expand Up @@ -155,7 +155,7 @@ function solveCaptcha() {
// get captcha value base64 starts---------
cy.get('.captcha-img').invoke('attr', 'src').then((value) => {
// api call to retrieve captcha value
cy.exec(`python3 irctc-captcha-solver/app.py "${value}"`).then((result) => {
cy.exec(`python irctc-captcha-solver/app.py "${value}"`).then((result) => {

cy.get('#captcha').clear().type(result.stdout).type('{enter}')
cy.get('body').then((el) => {
Expand Down
17 changes: 12 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@

## Features it has right now?

- ✓ Can book **Tatkal** and **Normal Tickets** as well.
- ✓ Can book **Tatkal**, **Premium Tatkal** and **Normal Tickets** as well.
- ✓ Can book tickets for you if you open even **2-3 minutes** before tatkal time.
- ✓ Signing in with your **username** and **password**.
-**Auto Upgradation Enabled**.
- ✓ Filling Captchas and retrying untill success.
- ✓ Support for **Food Choices**, **Seats Preferences**.
- ✓ Will Book only if confirm berths are alloted.
Expand All @@ -57,6 +58,10 @@


> [!NOTE]
> ```
> At a time either Tatkal Or Premium Tatkal can be -> true <- not both.
> ```
```
{
"TRAIN_NO": "12318",
Expand All @@ -66,6 +71,7 @@
"BOARDING_STATION": null, <-- Change to full station name if required, else leave null
"DESTINATION_STATION": "BSB",
"TATKAL": true,
"PREMIUM_TATKAL": false,
"UPI_ID_CONFIG": "",
"PASSENGER_DETAILS": [
{
Expand Down Expand Up @@ -103,6 +109,7 @@
"BOARDING_STATION": null, <-- Change to full station name if required, else leave null
"DESTINATION_STATION": "BSB",
"TATKAL": true,
"PREMIUM_TATKAL": false,
"UPI_ID_CONFIG": "",
"PASSENGER_DETAILS": [
{
Expand Down Expand Up @@ -171,15 +178,15 @@ npm -v # should print `10.5.0`
```

### After NodeJs and Npm Installation, its time for you to install python and pip3 on your system.
### After NodeJs and Npm Installation, its time for you to install python and pip on your system.
### After Python Installation Follow Below Steps.......
##### In Case You Want To Install Pip3 here's the command to install in Linux
##### In Case You Want To Install Pip here's the command to install in Linux
```sudo apt-get install python3-pip -y```


#### After Pip3 Installation you can install all requirements by pasting below command.
#### After Pip Installation you can install all requirements by pasting below command.
```
pip3 install -r irctc-captcha-solver/requirements.txt # <---- Make Sure You Run This Command From Code Folder.
pip install -r irctc-captcha-solver/requirements.txt # <---- Make Sure You Run This Command From Code Folder.
```

#### Check If Everything Works Fine....
Expand Down

0 comments on commit 33566c1

Please sign in to comment.