def make_scrape_request(session, url, mode='<STR_LIT>', data=None):
try:<EOL><INDENT>html = session.request(mode, url, data=data)<EOL><DEDENT>except RequestException:<EOL><INDENT>raise VooblyError('<STR_LIT>')<EOL><DEDENT>if SCRAPE_FETCH_ERROR in html.text:<EOL><INDENT>raise VooblyError('<STR_LIT>')<EOL><DEDENT>if html.status_code != <NUM_LIT:200> or SCRAPE_PAGE_NOT_FOUND in html.text:<EOL><INDENT>raise VooblyError('<STR_LIT>')<EOL><DEDENT>return bs4.BeautifulSoup(html.text, features='<STR_LIT>')<EOL>
Make a request to URL.