brozeph / node-craigslist

Node driver for searching Craigslist.com listings
MIT License
70 stars 43 forks source link

Craiglist has changed markup #11

Closed JakePartusch closed 8 years ago

JakePartusch commented 8 years ago

Looks like Craigslist has changed their markup since the last time this was updated. I'm working on a PR for the changes.

Here is an example element from the new markup:

<li class="result-row" data-pid="5860176271">

        <a href="/see/ctd/5860176271.html" class="result-image gallery" data-ids="1:00P0P_3IlMCFImstr,1:00Q0Q_2yT6oiXMXMm,1:00q0q_acQKZKPZrAw,1:00w0w_kLyz6zFzOtT,1:01010_9DjwOoUDpJq,1:00707_6ylrUdl3pnR,1:01414_4qnNxdSbTP1,1:00g0g_8PXG6lYQNhL,1:01717_iFWPkVwo1B7,1:00M0M_8doB1KRfskj,1:00M0M_aQFi2kHTwk4,1:00000_jbQc0aR0CfQ,1:00j0j_4HP8wRGtHfR,1:00g0g_aRJpJdVrWYW,1:00d0d_4uReTVs8kDj,1:00t0t_4IK8FnVWYJW,1:00909_kwyv7hM4uGa,1:00101_6n4ALF8ZmQx,1:00L0L_1LplADcLFqk,1:00i0i_hGWKB4DH2UN,1:01313_3Nvvxpu7u4e,1:00909_3fMOGJ7JQwD,1:00j0j_eP5r5fWHLDF,1:00000_95ycGWFZvkP"></a>

    <p class="result-info">
        <span class="icon icon-star" role="button">
            <span class="screen-reader-text">favorite this post</span>
        </span>

            <time class="result-date" datetime="2016-11-03 17:40" title="Thu 03 Nov 05:40:41 PM">Nov  3</time>

        <a href="/see/ctd/5860176271.html" data-id="5860176271" class="result-title hdrlnk">2006 *GMC Sierra* 1500 Denali AWD - Clean Carfax History! 2006 GMC Sie</a>

        <span class="result-meta">

                <span class="result-hood"> (*GMC* *Sierra*)</span>

                <span class="result-tags">
                    pic
                    <span class="maptag" data-pid="5860176271">map</span>
                </span>

            <span class="banish icon icon-trash" role="button">
                <span class="screen-reader-text">hide this posting</span>
            </span>
            <span class="unbanish icon icon-trash red" role="button" aria-hidden="true"></span>
            <a href="#" class="restore-link">
                <span class="restore-narrow-text">restore</span>
                <span class="restore-wide-text">restore this posting</span>
            </a>
        </span>
    </p>
</li>
brozeph commented 8 years ago

@JakePartusch - Thank you for the PR! I'll take a look shortly and get the units passing prior to committing and pushing an update.

brozeph commented 8 years ago

This is now resolved in v1.1.0!