File size: 386 Bytes
b0730a4
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# doc_utils.py

import requests

def get_questions_from_doc(url):
    try:
        response = requests.get(url)
        response.raise_for_status()
        text = response.text
        questions = [line.strip() for line in text.splitlines() if line.strip().endswith('?')]
        return questions
    except Exception as e:
        return [f"Error loading questions: {e}"]