Sponsored

Epa ratings determined for Maverick hybrid?

bgillen35

Well-known member
First Name
Brendan
Joined
Sep 16, 2021
Threads
7
Messages
540
Reaction score
1,482
Location
Orlando, Fl.
Vehicle(s)
'22 Prius, '19 Indian FTR-S, '20 Mustang EcoBoost
Also HAHAHAHA
1633557594924.png
That's from everyone on this page refreshing the site every 10 seconds waiting for the hybrid numbers to pop up....
Sponsored

 

zeketolliver

2.5L Hybrid
Well-known member
First Name
Jake
Joined
Apr 12, 2021
Threads
25
Messages
513
Reaction score
921
Location
Columbus, OH
Vehicle(s)
2023 Hyundai Tuscon NLine
Engine
2.5L Hybrid
That is the reasonable way which means it is no fun.

Lets use code to schedule a job to check it religiously every hour

Python:
import pip
pip.main(['install', 'sinbad'])
from sinbad import *
ds = DataSource.connect("https://www.fueleconomy.gov/ws/rest/vehicle/menu/model", format="xml")
ds.set_param("year", "2022")
ds.set_param("make", "Ford")
ds.load()
makes = ds.fetch('text')
[x for x in makes if 'ybrid' in x]
# print(makes)
Also HAHAHAHA
1633557594924.png
I don't have a build date, so maybe I will try my first python script!!
 

Egz

2.5L Hybrid
Well-known member
Joined
Sep 14, 2021
Threads
11
Messages
418
Reaction score
938
Location
Fredericksburg, VA
Vehicle(s)
2022 Maverick Hybrid Lariat, 1967 Fairlady
Engine
2.5L Hybrid
I wonder what is going to happen first. If my hybrid order is going to get scheduled, or if my Fisker Ocean reservation gets produced. LOL
 

Jakb

2.5L Hybrid
Well-known member
First Name
Jak
Joined
Aug 18, 2021
Threads
3
Messages
342
Reaction score
881
Location
Minneapolis, mn
Vehicle(s)
23 XLT Hybrid
Engine
2.5L Hybrid
I don't have a build date, so maybe I will try my first python script!!
Haha Here is full code I'm running on my computer to check every hour and send an email to myself.

Just my luck they will update the website but not the backend JSON or some nonsense.

Python:
import pip
import smtplib
pip.main(['install', 'sinbad'])
from sinbad import *

# Get data from JSON
ds = DataSource.connect("https://www.fueleconomy.gov/ws/rest/vehicle/menu/model", format="xml")
ds.set_param("year", "2022")
ds.set_param("make", "Ford")
ds.load()
makes = ds.fetch('text')
# Print all 2022 Fords
# print(makes)

# check if "ybrid" is in any of the values
available = 'Not checked'
if [x for x in makes if 'ybrid' in x]:
  available = True
else:
  available = False
# print(available)

# Create list to put in email
makelist = '\n'.join(makes)

# Set up email
toAddress = ['[email protected]']

if available == True:
    conn = smtplib.SMTP('smtp.gmail.com', 587) # smtp address and port
    conn.ehlo() # call this to start the connection
    conn.starttls() # starts tls encryption. When we send our password it will be encrypted.
    conn.login('[email protected]', 'YOUR_PERSONAL_APP_PASS_FROM_GMAIL')
    conn.sendmail('[email protected]', toAddress, 'Subject: EPA Alert!\n\nAttention!\n\nYour MPG is available today!\n\nhttps://www.fueleconomy.gov/feg/PowerSearch.do?action=noform&path=1&year1=2022&year2=2022&make=Ford&baseModel=Maverick&srchtyp=ymm&pageno=1&rowLimit=50\n\n\nVersions Available\n'+makelist+'\n\nGO SEE! GO SEE!')
    conn.quit()
    print('Sent notificaton e-mails for the following recipients:\n')
    for i in range(len(toAddress)):
        print(toAddress[i])
    print('')
else:
    print('The Maverick Hybrid EPA is not available.')
Just a warning, I am in no way a coder or someone who really knows what he is doing with python.
 

STARCOMMTREY1

2.5L Hybrid
Well-known member
First Name
Trey
Joined
Aug 6, 2021
Threads
77
Messages
2,421
Reaction score
6,544
Location
Boligee, AL
Vehicle(s)
F350, Ultra Classic, Versa Note and soon to be Mav
Engine
2.5L Hybrid
I vote we all get in a greyhound and just show up at Hermasillo demanding our hybrids!
 

sseiler

Well-known member
Joined
Aug 18, 2021
Threads
7
Messages
346
Reaction score
655
Location
TN
Vehicle(s)
RAV 4 XSE
 




Top