News for hackers. Stuff that matters.
Re:Fast scraping in Python with Asyncio by NoodleIncident on Tuesday March 04, 2014 @09:58AM (#7340527)
The robotparser library works fairly well. When I used it, it choked on a particular not-to-spec robots.txt file, but other than that it was fine.

Copypasta of dead comment:

nashequilibrium 13 hours ago | link [dead]

rp = robotparser.RobotFileParser()

rp.set_url("https://news.ycombinator.com/news/robots.txt")

rp.read()

# Reads the robots.txt

rp.can_fetch("*", 'https://news.ycombinator.com/news')

>>>> True

There are no comments on this comment yet.