Web scraping
Në shqip: Nxjerrja e të dhënave nga faqet
ShpjegimiSQ
Web scraping-u është marrja automatike e të dhënave nga faqet e internetit me kod — p.sh. çmimet ose lajmet. Në Python përdoren requests dhe BeautifulSoup. Kontrollo gjithmonë rregullat e faqes (robots.txt) dhe mos e mbingarko serverin.
EnglishEN
Web scraping is collecting data from websites automatically with code — like prices or news headlines. In Python you use requests and BeautifulSoup. Always check the site's rules (robots.txt) and don't overload the server.
Si ta mendosh
Si ta kopjosh orarin e autobusëve nga stacioni në fletore — vetëm se këtë e bën një robot, për qindra faqe.
Lexoje në anglisht
Like copying the bus timetable from the station into your notebook — except a robot does it, for hundreds of pages.
Shembull kodipython
import requests
from bs4 import BeautifulSoup
html = requests.get("https://fjalori.dev").text
titulli = BeautifulSoup(html, "html.parser").title.text
print(titulli)