3 ms·
article.published_at = Time.zone.parse(elm.css(".byline time").first.to_h["datetime"]) # timezone seems inconsistent, no big deal because we only care about
by minimaxir 12y ago
article.published_at = Time.zone.parse(elm.css(".byline time").first.to_h["datetime"])
# timezone seems inconsistent, no big deal because we only care about date anyway
I've written a TechCrunch scraper myself, and it turns out the reason the time-zone is inconsistent is TechCrunch outputs the time in 12-hour AM/PM...but forgets to include the AM/PM. So the hours just loop around from 0 to 12.
- samcrawford 12y agoI too wrote a little TC scraper a few months back, as a friend's startup was expecting an article there and I wanted to see it first. In the process I found a Wordpress bug that meant unpublished article headlines were leaked. Reported it to TC, no response at all. Reported it to Wordpress via Hackerone, they've fixed it for Wordpress VIP sites, but not in the main codebase yet. That was four months ago, and they've stopped responding to emails now.
- jdbiggs 12y agoWho did you email? I don't see anything. john@techcrunch.com