Skip to content

Instantly share code, notes, and snippets.

View maliozer's full-sized avatar
🕶️
[learn for time in range(life)]

Mehmet Ali Özer maliozer

🕶️
[learn for time in range(life)]
View GitHub Profile
@maliozer
maliozer / robotstxt.py
Last active February 1, 2020 02:13
Ethical Web Crawling Example
from urllib import robotparser
#robots.txt dosyasının bulunduğu adres.
ROBOT_PROTOCOL_URL = 'https://www.hepsiburada.com/robots.txt'
#robotFileParser örneğinin yaratılması ve robots.txt dosyasının adresten istenmesi.
robot_parser = robotparser.RobotFileParser(ROBOT_PROTOCOL_URL)
#read() robots.txt dosyasını okur.
robot_parser.read()