juftin / camply

camply, the campsite finder ⛺️ - a tool to find campsites at sold out campgrounds through sites like recreation.gov
https://juftin.com/camply/
MIT License
476 stars 93 forks source link

Implement More State Parks #211

Closed juftin closed 1 year ago

juftin commented 1 year ago

Is your feature request related to a problem? Please describe.

After https://github.com/juftin/camply/pull/208 gets across the line - it provides a clear path to easily implement all instances of States/Systems using UseDirect.

After a quick Google Search I can already find a lot of other states using this like Ohio and Minnesota.

Describe the solution you'd like

Simple Implementations for UseDirect Providers

juftin commented 1 year ago

Right now we're using the bulk endpoints for ReserveCalifornia @ https://calirdr.usedirect.com/rdr/rdr/fd/places - so anyone who has a subdomain with this endpoint will be an extremely simple implementation.

If that endpoint isn't surfaced everywhere some of this pruned API interaction code could be revived.

juftin commented 1 year ago

Still looking for other websites utilizing the rdr/rdr/fd/places endpoint - no luck yet

jamesadney commented 1 year ago

Not a state park, but this seems like the equivalent endpoint for Oregon Metro reservations.

https://oregonrdr.usedirect.com/oregonmetrordr/rdr/fd/places

juftin commented 1 year ago

Ohhhh! Jackpot! Looks like they have all the same API endpoints

https://oregonrdr.usedirect.com/oregonmetrordr/rdr/fd/places https://oregonrdr.usedirect.com/oregonmetrordr/rdr/fd/citypark https://oregonrdr.usedirect.com/oregonmetrordr/rdr/fd/facilities

I really didn't think anyone else was using these endpoints. Thanks so much @jamesadney - this definitely gives me a clear path to generalize the ReserveCalifornia provider and make it compatible with Oregon Metro

jamesadney commented 1 year ago

Awesome, glad I could help!

jamesadney commented 1 year ago

And while I'm here, thanks for the great project!!

juftin commented 1 year ago

And while I'm here, thanks for the great project!!

You're very welcome. I love supporting this project knowing that on the other end are campers snagging hard-to-get spots! I'll follow up once I've had some time to implement an Oregon Metro provider.

juftin commented 1 year ago

Actually, I already found another for Missouri State Parks: https://msprdr.usedirect.com/msprdr/rdr/fd/places / https://icampmo1.usedirect.com/MSPWeb/

I tried out Amass to do this and just picked an RDR subdomain:

docker run --rm -v $PWD:/.config/amass/ caffix/amass enum -d usedirect.com

There's probably some more advanced inspection I can do on usedirect.com using Amass to figure out where the other camping systems are.

juftin commented 1 year ago

Discovered API Endpoints

Discovered RDR Subdomains

juftin commented 1 year ago

Yeet! #259 is gonna be sweet. I just converted all of the ReserveCalifornia provider / search classes so all that's needed to implement a Provider and Search class is a few lines of code:

class ReserveCalifornia(UseDirectProvider):
    """
    ReserveCalifornia
    """

    base_url = "https://calirdr.usedirect.com"
    campground_url = "https://www.reservecalifornia.com"

class NorthernTerritory(UseDirectProvider):
    """
    Australian NorthernTerritory
    """

    base_url = "https://northernterritoryrdr.usedirect.com"
    campground_url = "https://parkbookings.nt.gov.au"
    rdr_path = "NorthernTerritoryRDR"
class SearchReserveCalifornia(SearchUseDirect):
    """
    Search ReserveCalifornia
    """

    provider_class = ReserveCalifornia

class SearchNorthernTerritory(SearchUseDirect):
    """
    Search Northern Territory
    """

    provider_class = NorthernTerritory

More providers coming soon!

juftin commented 1 year ago

Here's an example of implementing OregonMetro: https://github.com/juftin/camply/pull/259/commits/42ef8f15131a39d6f472ff79784c9a36f4757019

It includes the Provider class, Search class, hooks on the __init__ files to get picked up by camply, and a unit-test. More contributions welcome!

juftin commented 1 year ago

More Amass Dump:

Details

```console ❯ amass enum -passive -d usedirect.com -src [DNSHistory] cfreservecalifornia.usedirect.com [Yahoo] mnpos.usedirect.com [Wayback] ohiocamp-content.usedirect.com [Wayback] dev3.usedirect.com [HackerTarget] qpws.usedirect.com [Wayback] kiosk1.qpwsrd.usedirect.com [DNSHistory] vpnapsoutheast2.usedirect.com [HackerTarget] reservemn.usedirect.com [CertSpotter] dev.emailqueuer.usedirect.com [Wayback] bccamping.usedirect.com [HackerTarget] dev6.usedirect.com [HackerTarget] dev2.usedirect.com [HackerTarget] caliapp.usedirect.com [Wayback] biau.usedirect.com [Wayback] kiosk15.qpwsrd.usedirect.com [Ask] lblquotahunt.usedirect.com [CertSpotter] lparuatneptune.usedirect.com [HackerTarget] fairfax.usedirect.com [HackerTarget] recreation.usedirect.com [CertSpotter] lparqardapi.usedirect.com [HackerTarget] mta-sts.usedirect.com [HackerTarget] calirdr.usedirect.com [HackerTarget] vtdmv.usedirect.com [HackerTarget] rivcord.usedirect.com [Wayback] demo.usedirect.com [Maltiverse] ohiordr.usedirect.com [HackerTarget] dev1.usedirect.com [DNSHistory] ccsauth.usedirect.com [HackerTarget] ndmuseumsweb.usedirect.com [DNSHistory] flwebtest.usedirect.com [DuckDuckGo] nzpos.usedirect.com [DNSHistory] outdoors.usedirect.com [Wayback] kiosk15.qpwsr.usedirect.com [CertSpotter] lparuatmercury.usedirect.com [DNS] usedirect.com [Wayback] calird.usedirect.com [Wayback] w.usedirect.com [HackerTarget] rdlocalneptune.usedirect.com [Yahoo] bi.usedirect.com [DNSHistory] lpardevrdr.usedirect.com [HackerTarget] nzweb.usedirect.com [HackerTarget] alabamacamp-content.usedirect.com [HackerTarget] mail.usedirect.com [DNSHistory] kc-devops.usedirect.com [HackerTarget] rdlocalapi.usedirect.com [Wayback] mn.usedirect.com [HackerTarget] reservations.usedirect.com.usedirect.com [HackerTarget] svn.usedirect.com [Wayback] uatmaricopa.usedirect.com [Wayback] kiosk1.qpws.usedirect.com [HackerTarget] fairfax-content.usedirect.com [HackerTarget] vpnuswest2.usedirect.com [HackerTarget] uatoregonmetro.usedirect.com [HackerTarget] reservations1.usedirect.com [HackerTarget] nztraining.usedirect.com [HackerTarget] yodel-prod.usedirect.com [DNSHistory] vpnuseast1.usedirect.com [CertSpotter] www.rdlocal-cdn.usedirect.com [HackerTarget] fairfaxwebpp.usedirect.com [HackerTarget] charleston.usedirect.com [HackerTarget] cali-content.usedirect.com [HackerTarget] icampmo.usedirect.com [HackerTarget] maricopa-content.usedirect.com [Wayback] qpwsrd.usedirect.com [DNSHistory] flapptest.usedirect.com [Yahoo] alparkspos.usedirect.com [CertSpotter] lparqaneptune.usedirect.com [Maltiverse] floridardr.usedirect.com [DuckDuckGo] dotparking.usedirect.com [Wayback] reservationsl.usedirect.com [Maltiverse] florida-content.usedirect.com [Ask] reservemetro.usedirect.com [HackerTarget] ohpos.usedirect.com [HackerTarget] massdcr.usedirect.com [HackerTarget] nzhc-content.usedirect.com [Wayback] maricopapos.usedirect.com [Maltiverse] msp-content.usedirect.com [HackerTarget] arizona-content.usedirect.com [CertSpotter] lparuatrdr.usedirect.com [Maltiverse] mnrdr.usedirect.com [Wayback] fairfaxreports.usedirect.com [HackerTarget] usedirect.com.usedirect.com [HackerTarget] cali-content2.usedirect.com [HackerTarget] ohiocamp.usedirect.com [HackerTarget] calipos.usedirect.com [Wayback] golfmonmouth.usedirect.com [DNSHistory] lpardevmercury.usedirect.com [Maltiverse] virginiardr.usedirect.com [Bing] www.usedirect.com [Ask] washcoparks.usedirect.com [Yahoo] utahweb.usedirect.com [Wayback] kiosk15.qpws.usedirect.com [DNSHistory] cfnewzealand.usedirect.com [Maltiverse] msprdr.usedirect.com [Wayback] bcc-content.usedirect.com [Wayback] bccpos.usedirect.com [HackerTarget] devca1.usedirect.com [CertSpotter] emailqueuer.usedirect.com [HackerTarget] oc.usedirect.com [DuckDuckGo] nhdes.usedirect.com [HackerTarget] icampmo1.usedirect.com [HackerTarget] cvc.usedirect.com [HackerTarget] mndnr.usedirect.com.usedirect.com [HackerTarget] stlaw.usedirect.com [Yahoo] qpwstest.usedirect.com [DNSHistory] flpostest.usedirect.com [HackerTarget] calicc.usedirect.com [HackerTarget] essex7.usedirect.com [HackerTarget] uatnashvilleweb.usedirect.com [HackerTarget] rivco.usedirect.com [HackerTarget] nt-content.usedirect.com [HackerTarget] calihearst.usedirect.com [Wayback] ooc.usedirect.com [Maltiverse] alabamardr.usedirect.com [Wayback] bergen1.usedirect.com [HackerTarget] nashvilleweb.usedirect.com [Wayback] phmcweb.usedirect.com [DNSHistory] lparqamercury.usedirect.com [DNSHistory] supportdynamics001.usedirect.com [HackerTarget] yodel-dev.usedirect.com [HackerTarget] reservations2.usedirect.com [Wayback] fairfaxrdr.usedirect.com [Google] uatvaparks.usedirect.com [HackerTarget] alparksweb.usedirect.com [Wayback] ions1.usedirect.com [HackerTarget] bergen.usedirect.com [Maltiverse] mncontent.usedirect.com [HackerTarget] uatndmuseumsweb.usedirect.com [Wayback] maricopardr.usedirect.com [HackerTarget] laosp.usedirect.com [HackerTarget] uatessexweb.usedirect.com [HackerTarget] uattest.usedirect.com [Ask] virginiapos.usedirect.com [HackerTarget] mta-sts.mail.usedirect.com [Maltiverse] virginia-content.usedirect.com [Wayback] www.w.usedirect.com [HackerTarget] clay.usedirect.com [Wayback] floridapos.usedirect.com [HackerTarget] yodel-staging.usedirect.com [DNSHistory] flrdrtest.usedirect.com [Maltiverse] azrdr.usedirect.com [HackerTarget] vpncacentral1a.usedirect.com [Wayback] kiosk11.qpws.usedirect.com [DNSHistory] rdlocal-cdn.usedirect.com [Wayback] www.calicc.usedirect.com [DNSHistory] lpardevneptune.usedirect.com [HackerTarget] snoco.usedirect.com [HackerTarget] monmouthgolf.usedirect.com [HackerTarget] nzcontent.usedirect.com [DNSHistory] cfloadtestrdr.usedirect.com [LeakIX] hr.usedirect.com [DNSHistory] lpardevrdapi.usedirect.com [HackerTarget] icampmo2.usedirect.com [HackerTarget] reservestlouis.usedirect.com [Google] uatmsp.usedirect.com [Ask] cali.usedirect.com [HackerTarget] reservations.usedirect.com [HackerTarget] loc.usedirect.com [RapidDNS] bcc-content2.usedirect.com [Wayback] northernterritoryrdr.usedirect.com [HackerTarget] mdc.usedirect.com [HackerTarget] uatpamuseums.usedirect.com [HackerTarget] essexweb.usedirect.com [Wayback] arizonard-content.usedirect.com [CertSpotter] lparuatrdapi.usedirect.com [Crtsh] vpncacentral1.usedirect.com [Crtsh] help.usedirect.com [Crtsh] jcvpneast2.usedirect.com [Crtsh] loadtestrdr.usedirect.com [Google] washcoparkspos.usedirect.com [Crtsh] wiki.usedirect.com ```

vboginskey commented 1 year ago

Whoo, this is exciting! Just a heads up, ran into this little guy while testing with FloridaStateParks: https://github.com/juftin/camply/blob/68b094fcbb9fb60008d300bdcfeaa286758ccca2/camply/providers/usedirect/usedirect.py#L185-L186

juftin commented 1 year ago

Whoo, this is exciting! Just a heads up, ran into this little guy while testing with FloridaStateParks:

https://github.com/juftin/camply/blob/68b094fcbb9fb60008d300bdcfeaa286758ccca2/camply/providers/usedirect/usedirect.py#L185-L186

Good catch, I'll get that one too. Thank you

juftin commented 1 year ago

💪 I'm super proud of this one. 11 new providers!