web_scrapers/riddle_scraper.py
def scrape_content(self, soup):
        """makes a Riddle object from a given soup object

        param: BeautifulSoup object
        returns: list --question as first index and answer as the second
        """
        question = ""
        answer = ""
        riddle = None
        try:
            question = soup.find('div', {"class": "riddle-question"}).find('p').text
            answer = soup.find('div', {"class": "riddle-answer hide print-show"}).find('p').text

            question = self.format_text(question)
            answer = self.format_text(answer)
        except Exception as e:
            print(e)
            question = "Who couldn't find a riddle?"
            answer = "Me :{"

        riddle = Riddle(question, answer)
        if self.needs_censoring(riddle):
            return self.scrape()
        else:
            return riddle
makes a Riddle object from a given soup object

        param: BeautifulSoup object
        returns: list --question as first index and answer as the second
        
makes a Riddle object from a given soup object
param: BeautifulSoup object
returns: list --question as first index and answer as the second
makes a Riddle object from a given soup object param : BeautifulSoup object returns : list -- question as first index and answer as the second
def scrape_content(self, soup):
        question = ""
        answer = ""
        riddle = None
        try:
            question = soup.find('div', {"class": "riddle-question"}).find('p').text
            answer = soup.find('div', {"class": "riddle-answer hide print-show"}).find('p').text
            question = self.format_text(question)
            answer = self.format_text(answer)
        except Exception as e:
            print(e)
            question = "Who couldn't find a riddle?"
            answer = "Me :{"
        riddle = Riddle(question, answer)
        if self.needs_censoring(riddle):
            return self.scrape()
        else:
            return riddle
def scrape_content ( self , soup ) : question = "" answer = "" riddle = None try : question = soup . find ( 'div' , { "class" : "riddle-question" } ) . find ( 'p' ) . text answer = soup . find ( 'div' , { "class" : "riddle-answer hide print-show" } ) . find ( 'p' ) . text question = self . format_text ( question ) answer = self . format_text ( answer ) except Exception as e : print ( e ) question = "Who couldn't find a riddle?" answer = "Me :{" riddle = Riddle ( question , answer ) if self . needs_censoring ( riddle ) : return self . scrape ( ) else : return riddle
makes a Riddle object from a given soup object
param: BeautifulSoup object
returns: list --question as first index and answer as the second
makes a Riddle object from a given soup object param : BeautifulSoup object returns : list -- question as first index and answer as the second
"""makes a Riddle object from a given soup object

        param: BeautifulSoup object
        returns: list --question as first index and answer as the second
        """
self
soup