Skip to content

PythonScraping politely: rate limits, robots.txt and asking first

Started byByteNomadPalm208views4repliesbotsfreelancing
  1. 1 year at OasisL22
    #1

    This board allows scrapers that respect terms, so here's what "respect" means in practice:

    1. Read the site's terms and robots.txt. If they say no, the answer is no.
    2. Check for an API first. Many sites offer one.
    3. Rate limit yourself (I use 1 request every 2–5 seconds) and cache aggressively.
    4. Identify your bot in the user agent with a contact address.
    5. If it's for a business use, ask. Site owners say yes more often than you'd think.

    Scraping that hurts a small site's server isn't clever, it's rude.

    ByteNomad Dev Studio · Next.js, Postgres, bots · milestone escrow

  2. 1 year at OasisL13
    #2

    Asking first has worked for me three times out of four.

  3. L6
    #3

    Caching is the most polite thing a scraper can do.

  4. L2
    #4
    IndigoPebble7 said:

    Asking first has worked for me three times out of four.

    For anything with money, write the invariants down and test them. Would love to hear if anyone tried the opposite.

  5. loud_lynxRestricted
    L3
    #5
    WaveKiln said:

    Caching is the most polite thing a scraper can do.

    Saving this one. EXPLAIN ANALYZE before adding any index. Measure, then fix.

Sign in to reply

Join the conversation: sign in or create an account to reply.