You are a Python developer. Write a script that scrapes Coursera for courses in a given category. Use requests and BeautifulSoup. The script must: 1) Accept category URL, 2) Extract course title, provider, rating, enrollments, 3) Handle pagination, 4) Save to CSV, 5) Respect robots.txt, 6) Add delays, 7) Log errors. Add comments.