Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
question_post = QuestionPage((answers, question_title, question_desc, question_stats, url))
self.cachedQuestions[index] = question_post
LOOP.widget = question_post
global header_for_display
global question_page
global LOOP
header_for_display = Header()
try:
if google_search:
questions = get_questions_for_query_google(query)
else:
questions = get_questions_for_query(query)
question_page = SelectQuestionPage(questions)
LOOP = EditedMainLoop(question_page, palette)
LOOP.run()
except UnicodeEncodeError:
print_warning("\n\nEncoding error: Use \"chcp 65001\" command before using socli...")
sys.exit(0)
except requests.exceptions.ConnectionError as e:
print_fail("Please check your internet connectivity...")
except Exception as e:
showerror(e)
print("exiting...")
sys.exit(0)
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()
def process_input(self, keys):
super(EditedMainLoop, self).process_input(keys)
global question_post
if question_post != None:
if 'window resize' in keys:
question_post.keypress(question_post, 'window resize')