How to use the socli.socli.QuestionPage function in socli

To help you get started, we’ve selected a few socli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gautamkrishnar / socli / socli / socli.py View on Github external
def select_question(self, url, index):
            global question_post
            if self.cachedQuestions[index] != None:
                question_post = self.cachedQuestions[index]
                LOOP.widget = question_post
            else:
                if not google_search:
                    url = sourl + url
                question_title, question_desc, question_stats, answers = get_question_stats_and_answer(url)
                question_post = QuestionPage((answers, question_title, question_desc, question_stats, url))
                self.cachedQuestions[index] = question_post
                LOOP.widget = question_post
github gautamkrishnar / socli / socli / socli.py View on Github external
def dispres(url):
    """
    Display result page
    :param url: URL of the search result
    :return:
    """
    global question_post
    global header_for_display
    global LOOP
    randomheaders()
    res_page = requests.get(url, headers=header)
    captchacheck(res_page.url)
    header_for_display = Header()
    question_title, question_desc, question_stats, answers = get_question_stats_and_answer(url)
    question_post = QuestionPage((answers, question_title, question_desc, question_stats, url))
    LOOP = EditedMainLoop(question_post, palette)
    LOOP.run()