Sample work · Data & Scraping
Data Extraction: 40 Businesses from an Online Directory into a Clean Table
Name, town, phone, website and opening hours of 40 car repair shops, read from a directory, cleaned and checked. With code, validation rules and the finished file.
Sample work, not a client job. The business and all figures are invented, so you can see what the work looks like before you order anything.
What is delivered
- CSV file with 40 entries: name, town, phone, website, opening hours (Excel opens it directly)
- Cleaned: phone numbers in one format, spaces and line breaks removed
- Checked: no duplicates (name and town), no empty required fields
- The script behind it, so the list can be updated later on your own
The preview contains the first 20 of the 40 entries.
This is the half version. You get the complete product after payment – or adapted to your business as a commissioned job.
Fixed price before I start; nothing happens without your yes.
The CSV is the German original: its column headings are in German, the 40 entries are the ones described here.
The first six rows
| Name | Town | Phone | Opening hours |
|---|---|---|---|
| Reifen Bauer | Klagenfurt | +43 597 817838 | Mo-Fr 8:00-18:00 |
| Kfz Bauer | Linz | +43 578 641821 | Mo-Fr 8:00-18:00 |
| Kfz Wagner | Klagenfurt | +43 513 602643 | Mo-Fr 8:00-18:00 |
| Reifen Huber | Klagenfurt | +43 330 996445 | Mo-Do 7:00-16:30, Fr 7:00-12:00 |
| Kfz Leitner | Villach | +43 676 627415 | Mo-Fr 7:30-17:00 |
| Kfz Hofer | Klagenfurt | +43 304 515884 | Mo-Fr 8:00-18:00 |
How the data is read
First it is checked whether the site allows fetching in its robots.txt. Reading is slow, one page every three seconds, so the operator is not burdened. No personal data of private individuals is collected.
# VORSCHAU – halbe Fassung / PREVIEW - half version: lines 1-10 of 25.
# GL Tools sample work. This is the half version. You get the complete product after payment – or adapted to your business as a commissioned job. https://www.gltools.de/beispiele/datenextraktion-verzeichnis/
import time, requests
from urllib import robotparser
from bs4 import BeautifulSoup
BASE = "https://verzeichnis.example/kfz-werkstaetten?seite={}"
def allowed(url):
rp = robotparser.RobotFileParser("https://verzeichnis.example/robots.txt"); rp.read()
return rp.can_fetch("GLTools-Datenabruf", url)
# ... second half (15 more lines) is part of the complete product.