r/webscraping • • Apr 26 '25

Scraping coordinates, tried everything. ChatGPT even failed

0 Upvotes

Hi all,

Context:

I am creating a data engineering project. The aim is to create a tool where rock climbing crags (essentially a set of climbable rocks) are paired with weather data so someone could theoretically use this to plan which crags to climb in the next five days depending on the weather.

There are no publicly available APIs and most websites such as UKC and theCrag have some sort of protection like Cloudflare. Because of this I am scraping a website called Crag27.

Because this is my first scraping project I am scraping page by page, starting from the end point 'routes' and ending with the highest level 'continents'. After this, I want to adapt the code to create a fully working web crawler.

The Problem:

I want to scrape the coordinates of the crag. This is important as I can use the coordinates as an argument when I use the weather API. That way I can pair the correct weather data with the correct crags.

However, this is proving to be insanely difficulty.

I started with Scrapy and used XPath notation: //div[@class="description"]/text() and my code looked like this:

import scrapy
from scrapy.crawler import CrawlerProcess
import csv
import os
import pandas as pd

class CragScraper(scrapy.Spider):
    name = 'crag_scraper'

    def start_requests(self):
        yield scrapy.Request(url='https://27crags.com/crags/brimham/topos/atlantis-31159', callback=self.parse)

    def parse(self, response):
        sector = response.xpath('//*[@id="sectors-dropdown"]/span[1]/text()').get()
        self.save_sector([sector])  # Changed to list to match save_routes method

    def save_sector(self, sectors):  # Renamed to match the call in parse method
        with open('sectors.csv', 'w', newline='') as f:
            writer = csv.writer(f)
            writer.writerow(['sector'])
            for sector in sectors:
                writer.writerow([sector])

# Create a CrawlerProcess instance to run the spider
process = CrawlerProcess()
process.crawl(CragScraper)
process.start()

# Read the saved routes from the CSV file
sectors_df = pd.read_csv('sectors.csv')
print(sectors_df)  # Corrected variable name

However, this didn't work. Being new and I out of ideas I asked ChatGPT what was wrong with the code and it bought me down a winding passage of using playwright, simulating a browser and intercepting an API call. Even after all the prompting in the world, ChatGPT gave up and recommended hard coding the coordinates.

This all goes beyond my current understanding of scraping but I really want to do this project.

This his how my code looks now:

from playwright.sync_api import sync_playwright
import json
import csv
import pandas as pd
from pathlib import Path

def scrape_sector_data():
    with sync_playwright() as p:
        browser = p.chromium.launch(headless=False)  # Show browser
        context = browser.new_context()
        page = context.new_page()

        # Intercept all network requests
        sector_data = {}

        def handle_response(response):
            if 'graphql' in response.url:
                try:
                    json_response = response.json()
                    if 'data' in json_response:
                        # Look for 'topo' inside GraphQL data
                        if 'topo' in json_response['data']:
                            print("✅ Found topo data!")
                            sector_data.update(json_response['data']['topo'])
                except Exception as e:
                    pass  # Ignore non-JSON responses

        page.on('response', handle_response)

        # Go to the sector page
        page.goto('https://27crags.com/crags/brimham/topos/atlantis-31159', wait_until="domcontentloaded", timeout=60000)

        # Give Playwright a few seconds to capture responses
        page.wait_for_timeout(5000)

        if sector_data:
            # Save sector data
            topo_name = sector_data.get('name', 'Unknown')
            crag_name = sector_data.get('place', {}).get('name', 'Unknown')
            lat = sector_data.get('place', {}).get('lat', 0)
            lon = sector_data.get('place', {}).get('lon', 0)

            print(f"Topo Name: {topo_name}")
            print(f"Crag Name: {crag_name}")
            print(f"Latitude: {lat}")
            print(f"Longitude: {lon}")

            with open('sectors.csv', 'w', newline='') as f:
                writer = csv.writer(f)
                writer.writerow(['topo_name', 'crag_name', 'latitude', 'longitude'])
                writer.writerow([topo_name, crag_name, lat, lon])

        else:
            print("❌ Could not capture sector data from network requests.")

        browser.close()

# Run the scraper
scrape_sector_data()

# Read and display CSV if created
csv_path = Path('sectors.csv')
if csv_path.exists():
    sectors_df = pd.read_csv(csv_path)
    print("\nScraped Sector Data:")
    print(sectors_df)
else:
    print("\nCSV file was not created because no sector data was found.")

Can anyone lend me some help?


r/webscraping • • Nov 12 '24

I can't be the only one who felt this way, right?

0 Upvotes

I have been beating myself over the head for not knowing about web scraping for the past couple of weeks.

I am like there is no way it has been this simple this whole time.

I had always assumed I had to buy ads, build an audience, or buy leads, or information. Seeing I can get thousands of free emails, phone numbers, and data for free (small cost) then automate the whole process seems stupidly simple to me.

I guess it is one of those things, you don't know what you don't know.

I was curious if you felt the same way, or if you have sold data you have scrapped to others.

To me this seems simple to do, so why wouldn't others do the same?


r/webscraping • • Sep 13 '26

Getting started 🌱 Looking for a free/reliable way to scrape Amazon data

0 Upvotes

Looking for a free/reliable way to scrape Amazon data
Hi everyone,
I’m currently working on a project that requires scraping product information from Amazon (mainly product titles, prices, images, descriptions, etc.).
At the moment, I’m using several different scraping services/APIs and rotating between multiple API keys to stay within their free limits. However, this has become extremely impractical because I constantly reach the limits and end up having to create new accounts/keys throughout the day.
I’m looking for a more sustainable free or open-source solution that I can run myself, preferably using Python.
I’ve looked into tools such as BeautifulSoup, Selenium/Playwright and various Amazon scrapers, but I’m not sure what the best approach is nowadays, especially regarding Amazon’s anti-bot systems.
The volume isn’t enormous, but I do need to process a fairly large number of products consistently.
What would you recommend?
Is there a good open-source Amazon scraper that can realistically be self-hosted?
Is Playwright/Selenium still viable for this?
Are there any free proxies/approaches that make sense for a small project?
Or is there another architecture you’d recommend instead of relying on multiple scraping APIs?
I’d really appreciate any advice from people who have built something similar.
P.S. English isn’t my first language, so I used ChatGPT to help me write this post. 😅
Thanks!


r/webscraping • • Sep 21 '26

Three DataDome-protected sites, one conclusion

Post image
0 Upvotes

I keep seeing the same default playbook for scraping anti-bot-protected sites: spin up headless browsers, buy a proxy pool, subscribe to a CAPTCHA-solving API, and scale horizontally from there. That stack is expensive, heavy, and often solving problems we don't actually have.

Over the last few weeks I worked through three sites all protected by the same vendor — DataDome — to find out how little of that stack we can get away with. Three different target types: a software review site (G2), a property listings site (idealista), and a luxury e-commerce site (Hermès). Sharing because the pattern held across all three.

The core idea, and it's boringly simple: match the request the application itself makes, and stop there. Most of the time we're blocked for asking in a shape no real user's browser would ever produce — not because we've been "detected" in some deep way.

Case 1 — G2. Two weeks lost to the wrong variable. I built a hardened stealth browser (native C++ patches, the works) and it worked — until it stopped, everywhere, on every exit. The actual cause was that my own stealth layer was lying: it pinned outerWidth = innerWidth and outerHeight = innerHeight + 85, so every browser reported a window with exactly zero horizontal chrome and exactly 85px of vertical. Impossible numbers. A plain system Chrome with the evasion layer off walked straight through.

→ The Hard Part Isn't Parsing HTML Anymore

Case 2 — idealista. The G2 fix actively pointed the wrong way here. Same vendor, opposite prescription: G2 reads window geometry (remove a lie), idealista reads input hardware (supply a missing field). The browser that failed G2 solved idealista, and vice versa. Turned out neither was causal — one flag controlled it, and the real principle was coherence, not capability. A browser isn't scored on how impressive it looks; it's scored on whether its account of itself is self-consistent.

→ DataDome Anti-Bot Testing: Coherence, Not Capability

Case 3 — Hermès. Applied both lessons. The product API looks completely sealed — paste it in a browser tab and we get "Access is temporarily restricted." But that's a top-level navigation, which no real shopper's browser ever does to a JSON endpoint. Ask the same URL as a same-site CORS fetch with an Origin header and the right sec-fetch-* values, and it returns 200. Same URL, same zero cookies, different request shape.

What actually held up, measured across all three:

· Hermès catalogue + listing API: zero cookies, no proxy, no browser, ~1.6s for the full walk. The listing endpoint returns 48 products per request — SKU, title, price, size, colour, stock — unmetered.

· Product detail tier (all three): the one place a real browser earned its keep — and only used once, to mint trust that a plain HTTP client then spent.

· Hermès product detail, head-to-head: one browser over the whole queue = ~4.8s/product, 12/12 extracted. The "clever" mint-a-session-and-rotate approach = ~35s/product, 7/12. The boring approach won by 7x.

· A paid CAPTCHA-solving API exists for Hermès. It works. It also means renting access per request, when request-shaping got the catalogue tier for free.

· Commercial proxy exits actively hurt on all three — fresh residential IPs refused on protected tiers while a clean connection served the same pages in the same second.

The habits that mattered more than any tooling:

  1. Start with the cheapest client you have. Its failure mode is free information.

  2. Read the block page. The server header and page title tell you which vendor you're arguing with in about five seconds.

  3. Add one capability at a time and stop the moment it passes. The gap between "curl fails" and "a browser works" is wide, and the answer is usually closer to the curl end.

  4. A stealth layer is a claim about what the browser is — if the browser is already telling the truth, the claim can only make it a liar.

  5. Bracket every test with a known-good control. Anti-bot testing is stateful — your failed attempts change the thing you're measuring, and a poisoned window looks identical to a real block.

  6. Look for a second door to the same data. The tidy REST endpoint is the one vendors expect bots to hit, so it's the one they meter hardest. The heavier HTML page real users load often carries the identical payload unmetered.

The result across all three: most of the data came out through a lightweight HTTP client, and the browser got spent on one fraction of the job instead of all of it. Lighter, cheaper, easier to scale — and it generalised, which the tooling-specific lessons didn't.

Full write-up on Hermès with the numbers and the request-shape diff (no paywall): Hermes Scraping Guide

Curious whether others have found the same that the expensive tooling is often solving a problem a correctly-shaped request never had.


r/webscraping • • Jun 22 '24

Facebook's insanity

0 Upvotes

I'm currently experiencing high levels of frustration around the delinquency of the facebook platform. I can't seem to scrape the publicly displayed data of the pages people put online to do exactly that: publicly displayed their data.

Has anyone else felt this stupidity? The meta platform has limited capacity and is limited to those with a business. It's like they are saying that they only thing that has value in the world is money. "Oh, you aren't a for profit organization trying to sell something ... the exit is over there ...".

They are deliberately against sharing publicly but don't mind if their users share polarizing material. Facebook is irresponsible.

Why the hell is it so difficult? They have all their classes dynamically generated?!?


r/webscraping • • Mar 01 '25

Reddit Scraping without Python

0 Upvotes

Hi Everyone,

Please I am trying to scrape Reddit posts, likes and comments from a Search result on a subreddit into a CSV or directly to excel.

Please help 🥺


r/webscraping • • Feb 22 '26

How to scrape restaurants data in the US to create my own directory?

0 Upvotes

PLEASE DO NOT SUGGEST Google Places API or Maps API, or anything of that sort. It is a violation of their terms/policy.

Please help suggest a legit way to scrape restaurants data in the US and compile a list containing their basic info, name, photos (without copyright infringement if possible), hours, menu, website ... etc.

Please avoid suggesting using APIs where my use case (creating a directory) is strictly prohibited by the API. You cannot use Google Places API to store the data and create a "competitor".

What tools and logic would you use?

Thanks


r/webscraping • • Apr 12 '25

Purpose of webscraping?

6 Upvotes

What's the purpose of it?

I get that you get a lot of information, but this information can be outdated by a mile. And what are you to use of this information anyway?

Yes you can get Emails, which you then can sell to other who'll make cold calls, but the rest I find hard to see any purpose with?

Sorry if this is a stupid question.

Edit - Thanks for all the replies. It has shown me that scraping is used for a lot of things mostly AI. (Trading bots, ChatGPT etc.) Thank you for taking your time to tell me ☺️


r/webscraping • • Oct 16 '26

Scrapping subreddit

0 Upvotes

What’s the best way to scrap a subreddit every 20-30s without getting blocked by Reddit anti bot system.

I want to scrap this subreddit every 30s for new posts.


r/webscraping • • Jun 11 '24

Scaling up I can scrape any public page I want and have many scrapers I wrote but I am a "beginner", what would make me a "pro"? What skills do I need?

0 Upvotes

Hi all,

I want to scrape harder pages like LinkedIn, etc. How do I accomplish this? What makes you "advanced"?

To start, I don't use proxies so I know that's one thing at least. What else is there in your toolbelt that helps you scrape "anything"?

I have experience (1-2 years at a hedgefund) setting up scrapers that have been running daily, navigating pages, and even entering one time passwords to authenticate and crawl 60+ tabs at once. What am I missing?


r/webscraping • • Aug 12 '25

It's so hot in here I can't code 😭

0 Upvotes

So rn it's about 43 degrees Celsius and I can't code because I don't have an ac, anyways I was coding an hcaptcha motion data generator that uses oxymouse to generate mouse trajectory, if you know a better alternative please let me know.


r/webscraping • • Jun 01 '25

I need a list of websites that do not require JS

0 Upvotes

I basically need a dataset of websites that do not require javascript to fully render. I am trying to use ML to detect whether a website needs to use JS rendering to be fully rendered, so I need some dataset of websites that can only be rendered with JS enabled and some dataset of those that do not need rendering. I managed to use publicwww to get 3000 websites that require JS by filtering the websites that are using React, Vue and Angular. But now I'm stuck with trying to figure out how to get the list of websites that do not require javascript to fully render. I've tried to scrape neocities websites but I think it's not enough. Can anyone give me a tip on how to expand the dataset?


r/webscraping • • Sep 06 '24

If scraping is illegal how does Google do it legally?

18 Upvotes

How do search engines do it legally?

If building a business on top of web crawling could get you legal issues with copyrights.


r/webscraping • • Apr 21 '26

Hiring 💰 Looking for an elite web scraping expert

0 Upvotes

Hi Everyone!

We’re a small group of developers building a high performance real time platform, and we’re looking for a truly top tier scraping expert to join us.

We monitor selected web pages and blog posts, where speed, stability, and reliability are critical. We need someone who knows how to build extremely fast, resilient scraping systems that can run consistently under pressure.

We can fully support the required infrastructure and operating costs.

If you have deep experience in advanced scraping, parsing, monitoring, failure resistance, and building systems where every second matters, send me a DM.


r/webscraping • • Oct 21 '25

AI ✨ ChatGPT Atlas has landed

Thumbnail chatgpt.com
0 Upvotes

How might this affect the scraping market?

It's likely there will always be a place for browserless scraping, but does this make weaken the case for headless browsers?


r/webscraping • • Dec 17 '25

We're building Replit for web scraping (and just launched on HN!)

Thumbnail news.ycombinator.com
0 Upvotes

Link to app: https://app.motie.dev/

TLDR: Motie allows users to scrape the web with natural language.


r/webscraping • • Aug 10 '26

Getting started 🌱 How to use ai to scrape websites

0 Upvotes

i wa trying to scrape some website and get their websocket but its encrypted and ai didnt let me do it (cause of permissions) how can i make ai to be able to scrape


r/webscraping • • Jan 31 '21

Go from 0 coding experience to scraping airbnb.com in under 3 hours

0 Upvotes

Hey everyone 👋🏻

Inspired by my experience teaching myself to code and then teaching Python at General Assembly, I just launched Like I Am Five last week to teach people to code…well…like they’re 5 🤓. Each course teaches a practical Python skill (like web scraping) to people with 0 technical experience in less than 4 hours.

I’d love some feedback on the site if you all are willing to share! I also made a coupon code (“REDDIT”) for 70% off if you want to support the hustle and help me pay for groceries 🥰

Cheers!


r/webscraping • • May 15 '23

really need help with web scraping

Thumbnail
gallery
0 Upvotes

r/webscraping • • Jan 05 '25

Creating a (web) app to interact with scraped data

0 Upvotes

Hey all,

I‘m doing my first web scraping project that arised out of a private need: scraping car listings from the popular mobile.de. The page is very limited when it comes to filtering (i.e. only 3 model/brand exclusion filters) and it‘s a pain to browse it with alle the ads and looking at countless listings.

My code to scrape it actually runs very well and I had to overcome challenges like botdetection with playwright and scraping by parsing the URL (and also continuing to scrape data from pages abover 50 even though the website doesn‘t allow you to display listings after page 50 except for manually changing the URL!)

So far it has been a very nice personal project and I want to finish it off by creating a simple (very simple!) web app using FastAPI, SQLite3 and htmx.

However I have no knowledge of designing APIs, I have only ever used them. And I don‘t even know what exactly I want to ask here, and ChatGPT doesn‘t help either.

EDIT: Simply put, I am looking for advice on how to design an API that is not overcluttered, uses as little endpoints as possible and that is "modular". In example I assume there are best practices or design patterns that might say something along the lines of "start with the biggest object and move to the smallest one you want to retrieve".

Let's say I want to have an endpoint that gets all the brands that we have found listings for. Should this only be a simple list output? Or (what I thought would make more sense) a dictionary containing each brand, the number of listings and a list of the listing IDs. we would still be able to retrieve just the list of all the brands from the dictionary keys but additionally also have more information.

Now I know that this does depend on what I am going after, but I have trouble implementing what I am going after, because I feel like I am gonna waste my time again starting to implement one option and then noticing something about it is ass and then change it. So I am most simply just asking if there are any design patterns or templates or tutorials or anything for what I want to do. It's a tough ask I know, but I thought it'd be worth it to ask here. EDIT END

I tried making a list of all functions I want to have implemented, I tried doing it visually etc. I feel like my use-case is not that uncommon? I mean scraping listings from pages that offer limited filters is very common isn‘t it? And also using a database to interact with the data/filter it more as well, because what‘s the point to using excel, csv or plain pandas if we are going to be either limited or it‘s a lot of pain to implement filters.

So, my question goes to those that have experience with designing REST APIs to interact with scraped data in a SQLite database and ideally also creating a web app for it.

For now I am trying to leave out the frontend (by this I mean pure visualization). If there‘s anyone available I can send some more examples of how the data looks and what I want to do that‘d be great!

Cheers

EDIT 2: I found a pdf of the REST API design rulebook, maybe that will help.


r/webscraping • • Apr 20 '26

🛒 I built a price tracker for Mercado Libre from scratch.

0 Upvotes

No third-party tools. No paid alerts. Just Python, the MeLi public API, and GitHub Actions.

How it works:

→ Hits the official Mercado Libre API every 6 hours

→ Stores price history in SQLite

→ Detects price drops and sends alerts via Telegram or email

→ Automatically deploys a static dashboard to GitHub Pages

Everything runs on GitHub Actions — no server, no cost.

🔗 github.com/Lazaro549/meli-price-tracker

Full stack:

• Python + Flask

• SQLite

• Chart.js for the graphs

• GitHub Actions (scheduler + CI/CD)

• GitHub Pages for the public dashboard

The repo is open. Whether you sell on MeLi or just want to know when that product in your cart finally drops — this might help.

#Python #GitHub #MercadoLibre #Automation #OpenSource


r/webscraping • • Apr 09 '25

Trying to learn web scraping from Claude and feel like an idiot

1 Upvotes

I've been wanting to extract soccer player data from premierleague.com/players for a silly personal project but I'm a web scraping novice. Thought I'd get some help from Claude.ai but every script it gives me doesn't work or returns no data.

I really just want a one time extraction of some specific data points (name, DOB, appearances, height, image) for every player to have played in the Premier League. I was hoping I could scrape every player's bio page (e.g. premierleague.com/players/1 premierleague.com/players/2 etc. and so on) but everything I've tried has turned up nothing.

Can someone help me do this or suggest a bettter way?


r/webscraping • • Apr 04 '26

I want to use Python to find people who need lawyers

1 Upvotes

Hey everyone,

I'm a developer helping a lawyer grow their practice, and I'm looking for advice on building a legitimate lead generation pipeline using Python.

I want to find platforms where people are already publicly asking for legal help, so that contacting them is appropriate and compliant with solicitation rules.

I'm interested in:

  • Sites or communities where people actively seek attorney recommendations

  • APIs, scraping opportunities, or data pipelines that could surface these requests

  • Any legal tech tools or databases worth knowing about

Has anyone built something like this before? I'd love to hear what worked, what didn't, and any ethical or legal pitfalls to watch out for. Open to any creative ideas beyond just scraping, such as automation, monitoring tools, anything Python-related that's helped grow a legal practice.

Thanks in advance!


r/webscraping • • Jan 16 '25

webscrapping talabt uae

1 Upvotes

1.      Extract the following fields for all restaurants listed on Talabat (https://www.talabat.com/uae) in the UAE:

·         Restaurant Name

·         Cuisine Type(s)

·         Location/Area

·         Ratings (if available)

·         Delivery Time (if available)

·         Average Cost/Price Range (if available)