How I built a Slack bot to help me find an apartment in San Francisco
dataquest.io
dataquest.io
Here's the code btw:
I didn't know that many people used eBay Kleinanzeigen for apartments. Good to know.
I'm not the OP, but in common they have nothing much really, but beggars can't be choosers (which is the main issue)
They're usually accessible and are popular with expats (except Tegel, I wouldn't go there)
The housing situation in Berlin is not nearly as bad as in other large cities BTW (contrary to what most people say), and although it got more difficult to find something nice for a reasonable price it's still possible.
On the other hand a rule quite frequent among my peers is when you list an add, ignore those that call in the first 8 working hours. Most of those calls are professional dealers (vehicles, properties, hardware) using bots that will only waste your time by trying to lower the price substantially in order to make a quick buck.
What happened to background checks, credit checks, and general tenant due diligence?
"Well Mr. Applicant, it says here on your application, you're a heroin addict with a history of extreme violence and a credit score of zero, you don't have the income or the deposit, and quite frankly, I'm not sure how you'll pay the rent. But you did respond to my ad in 6 milliseconds thanks to a python script, so I guess the apt is yours! Welcome home!"
My guess is that a quicker reply would give you little to no advantage when it comes to mom&pop landlords who only have a couple units to lease out. All but one of the places I've rented have been from small time landlords and they seemed to put more work into than just who replied the fastest.
As a beginner to programming, not knowing how to build anything, and seeing someones thought process. It's very valuable and enjoyable to read.
This is a famous math problem (the “secretary problem”) with the lovely solution that you should define a time interval over which to search and not commit to anything until you’ve spent 1/e of that time -- 37% -- noncommittally exploring your options.
https://medium.com/galleys/optimal-stopping-45c54da6d8d0#.lj...
It's just so draining to have to contact all these people, and view their places. I guess it's like job hunting, except you're paying money. It doesn't help that I'm not very good with strangers.
Backpacking/couchsurfing is much more lightweight.
When I was searching for apartments in the NYCish area, I asked Zillow to ping my phone when a good listing came in.
One day, I got a ping during class and called the broker as fast as I could. "Yeah," he said, "I posted that listing 20 minutes ago but you're like the 6th caller. You almost certainly won't get it, sorry."
Especially if you could go through 12 people and end up with nothing (since that gives time for people to find alternatives)
Neither? We schedule an open house for the next weekend, people make their offers that day, then we accept one the following day.
The list of "San Francisco" neighborhoods being searched are almost all more than 1.2 miles from BART. I'm sure it's hard to find an apartment if you have a robot excluding nearly all listings.
FWIW, there's been an apartment vacant in my building for 2+ weeks, with very few open house attendees. Other nearby buildings are much the same. If you're willing to look slightly outside the most desirable neighborhoods, it isn't that hard to find an apartment. Affordable? Well that's another story; this is SF after all.
Not trying to be pedantic but "willing to look slightly outside" is pretty ambiguous for a city like SF. The Tenderloin is slightly outside of Nob Hill, a very upscale and posh/safe neighborhood, whereas the Tenderloin greets you with used heroin needles on the street, homeless crackheads running around, and the noise of constant sirens.
I agree with you on affordability, though. Number one reason why I'm glad I'm back in the South Bay. Also, I'd rather enjoy the laid back nightlife of Los Gatos or Campbell over the Marina or Polk Street (20 year old sorority girls puking all over the place) any day.
But that doesn't mean you can't live in Forest Hill, or the Excelsior, or Balboa Park, or West Portal. I find lots of people totally discount what I think are some of the nicer parts of SF to live in because they're not walking distance from the mission.
If I were a little more amenable to driving/riding, I could easily see myself living in a quieter neighborhood, given that I certainly value the ability to have a quiet(er) place to live and sleep soundly!
The K, L and M lines of the Muni Metro serve Forest Hill, West Portal. The L line goes to the SF Zoo but the K and M (along with the J) lines terminate at Balboa Park station. Personally, I prefer the Metro over BART due to its cleanliness and frequency of service.
I'm not sure about transit in Excelsior but I don't think it is that great.
They only filtered by BART distance for the listings outside San Francisco: "Priya and I knew we’d both be traveling to San Francisco a lot, so we wanted to live near public transit if we weren’t going to be [in] SF."
This is true for anything with less than 2 bedrooms. If you are looking for anything with 2 bedrooms or more (not a studio, one bedroom, or roommate situation) then finding an apartment within the northern Bay Area, including East Bay, downtown, or the peninsula, is quite difficult regardless of price.
Edit: from the post it does look like they were looking for a one bedroom place. They're using python-craigslist[1]. From the readme it doesn't look like it exposes the bedrooms under "CraigslistHousing" but the code tells a different story in __init__.py[2] and does seem to snag "bedrooms" and "bathrooms" as well as additional properties. Just in case anyone was looking to fork this and add some handling for the number of bedrooms or bathrooms.
[1] - https://github.com/juliomalegria/python-craigslist
[2] - https://github.com/juliomalegria/python-craigslist/blob/mast...
So I built some shell scripts that scrapped all the websites, and generated some tables of pairs of houses sorted by the distance between them that can be easily read by awk. Then I could run queries on them.
All the scrapping was done with regular expressions, no fancy HTML parsing here.
For the distance calculation, I got the geographic coordinates by piping the address of the residence to Google Maps. I then calculated the geodesic distace between them in my scripts. Initially I wanted to let Google Maps calculate the more useful walking distance between residences, but that made the algorithm O(n²), and I ran into Google API free quota issues even with O(n). Geodesic distace was a good enough proxy though.
Being able to use awk, I could use any kind of arbitrary query I could think of. I filtered all residences that were not direct sales (used an agency), they were unfurnished, that were in a place where I didn't want to live (few such places in Vienna though), that were outside my price range, etc. basic stuff.
However, I could create arbitrary utility functions. For example it was really important for me that apartments were close together. So I was willing to sacrifice location, or the total area, or the numbers of rooms if they were really close, but if they were further away, I required more rooms or better location. No real estate agent or website will be able to do this for you.
In the end, it was too much trouble to rent two apartments, so we only rented one. However, the software was still very useful as it presensed all data in a much useful format, multiplexing data from all websites, and the data coming already filtered.
Plus being all text-based, and this being Unix and all that, I could easily manually input the 100 or so metro stations as "houses", so we could sort apartments based on the distance to the nearest metro station. And again I could create arbitrary utility functions. For example the U3 line is much more important for us than the U6 line, and we really don't care about U2 at all.
[1] https://code.google.com/archive/p/operation-housefinder/
The title sounds like "How I used a cherry to make a birthday cake". Intriguing, yet disappointing when you learn he only placed the cherry on the top of the finished cake for pretty decoration.
https://www.eff.org/deeplinks/2015/06/padmapper-and-3taps-se...
I wonder how many people have. A quick search on GitHub shows all kinds of cl scrapers.
The whole experience of searching a suitable house is just aweful, all listing sites are basically full of spam and scams:
- most houses are already taken, but they leave them on the site because free exposure/advertising for the realtor/landlord.
- pictures that are not taken in the actual apartment (they just reuse pictures of a different apartment that kinda looks like it).
- ads that look like normal list items (dark ui).
- super good looking houses for low prices, that turn out to be fake, just to promote the realtor/landlord name.
- loads of hidden costs (service, administration, VAT, parking etc).
- all sorts of requirements (based on sex, income, ethnicity, type of work and what not).
Disclaimer: I know the owner (friends with my wife who is from the area, we are living in Eastern US)
They are flexible and probably willing to be a proxy on your behalf.
The best place to look seems to be Facebook groups. People quickly call out scammers and the real estate folks post new listings regularly.
https://github.com/christopher-skeels/add-walking-times-to-t...
160 p_text = row.find('span', {'class': 'p'}).text
'Nonetype' object has no attribute 'text'
Might be worth trying this code for other cities though :)
1. Craigslist combines listings that come in at once into a single email. That's fine, but they truncate the results (... SNIP...) if a lot of listings come in. Why? Are they worried about exceeding your incoming email size limit with an all-text email?
2. Sometimes they send emails with zero results. Again, why?
3. Maybe not an issue in NY or SF where good apartments rent minutes after listing, but even in Seattle's hot housing market duplicate listings are a big problem. I've seen the same listing posted multiple times per day for days on end. All of these listings appear in Craigslist's email alerts, so you have to wade through them all. While the author didn't address this in his bot's code, I see filtering out duplicate or "already seen, not interested" listings as the biggest benefit to a home-made solution like this.
My landlord's property manager actually does this with the place I'm renting now. Every 3 hours the previous ad would be deleted and a new one with the exact same content would pop up in its place, obviously to stay on the front page. I thought it was a scam at first because surely that's not what normal landlords do? I did my due diligence that it wasn't a scam (which I would do anyways) but I was super, super suspicious. Turns out real landlords do that.
Yet people still prefer hammers over rocks..
I guess the author chose slack in the title because it will result in eyeballs rather than saying how he used Python, craigslist because they aren't "sexy".