def get_extract_response(self, message): args = ' '.join(message[1:]) url = 'https://en.wikipedia.org/w/api.php?' params = {'format': 'json', 'action':'query', 'prop':'extracts', 'titles': args} utils = WebserviceTools() response = utils.getJsonResponse(url, params) return response
def create_url(self, card_name): modified_name = UrlUtils.convertRawStringToURL(card_name) url = 'http://sales.starcitygames.com/cardsearch.php?singlesearch=%s' % modified_name soupUtils = WebserviceTools() soupForCard = soupUtils.getPageAsBeautifulSoup(url) return soupForCard
def create_url(self, card_name): modified_name = UrlUtils.convertRawStringToURL(card_name) url = 'http://netrunnerdb.com/find/?q=%s' % modified_name soupUtils = WebserviceTools() soupForCard = soupUtils.getPageAsBeautifulSoup(url) return soupForCard