samyun / southwest-price-drop-bot

Bot that watches Southwest flights for price drops.
Other
74 stars 41 forks source link

Failed to return value #72

Open r1rider01 opened 2 years ago

r1rider01 commented 2 years ago

So 1) to make this work in DOCKER I had to run the following:

install chrome

RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install

2) It pulls and checks the site mongo successfully connected!

found 2 alerts, checking...

lock has available permits: 5

lock has available permits: 4

Entered lock, available permits: 3

Entered lock, available permits: 3

Retrieving URL: https://www.southwest.com/air/booking/select.html?originationAirportCode=DAL&destinationAirportCode=LAS&returnAirportCode=&departureDate=2022-04-X&departureTimeOfDay=ALL_DAY&returnDate=&returnTimeOfDay=ALL_DAY&adultPassengersCount=2&seniorPassengersCount=0&fareType=USD&passengerType=ADULT&tripType=oneway&promoCode=&reset=true&redirectToVision=true&int=HOMEQBOMAIR&leapfrogRequest=true

Retrieving URL: https://www.southwest.com/air/booking/select.html?originationAirportCode=LAS&destinationAirportCode=DAL&returnAirportCode=&departureDate=2022-04-X&departureTimeOfDay=ALL_DAY&returnDate=&returnTimeOfDay=ALL_DAY&adultPassengersCount=1&seniorPassengersCount=0&fareType=USD&passengerType=ADULT&tripType=oneway&promoCode=&reset=true&redirectToVision=true&int=HOMEQBOMAIR&leapfrogRequest=true

but after about 5mins it returns alot of code/html (but doesn't seem to be the right data, when i try and search it, it doesn't have any flight info in it) and I get the following:

Error: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.

at CDPSession.send (/home/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:214:35)

at next (/home/app/node_modules/puppeteer-extra-plugin-stealth/evasions/sourceurl/index.js:32:41)

at CDPSession.send (/home/app/node_modules/puppeteer-extra-plugin-stealth/evasions/sourceurl/index.js:65:16)

at ExecutionContext._evaluateInternal (/home/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:204:50)

at ExecutionContext.evaluate (/home/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:27)

at DOMWorld.evaluate (/home/app/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:95:24)

at runMicrotasks (<anonymous>)

at processTicksAndRejections (node:internal/process/task_queues:96:5)

No flights found!

No flights found!

Min price: Infinity

Min price: Infinity

Got price: 4/X/2022|LAS|DAL|2644 { time: 1640724203685, price: Infinity }

Got price: 4/X/2022|DAL|LAS|1826 { time: 1640724203684, price: Infinity }

4/X/2022 #2644 LAS → DAL not cheaper

4/X/2022 #1826 DAL → LAS not cheaper

I removed some dates....but I am able to take the URL that the script uses and it pulls up fine, but I guess SW see's its from a machine and gives me a "Sorry, we found some errors... We are unable to process your request."

iloveitaly commented 2 years ago

Yup, you'll get that error from southwest when they have detected you are a bot. This is common if you are running this on a cloud provider.

r1rider01 commented 2 years ago

Yup, you'll get that error from southwest when they have detected you are a bot. This is common if you are running this on a cloud provider.

i'm actually running from my house on my little dell ubuntu docker box I have setup.