reload(sys) sys.setdefaultencoding('utf-8') import re import chardet import hashlib import time import requests import json import MySQLdb import db_conf from db_helper import db_helper_class import requests_pkg from email_server.email_sender_calss import email_sender_calss db_oper = db_helper_class() email_sender = email_sender_calss() #file = open("100.txt") url = 'https://ca.ovh.com/engine/api/dedicated/server/availabilities?country=we' #url2 = 'https://www.ovh.com/engine/api/dedicated/server/availabilities?country=ie&hardware=' types = { '1804armada01': 'ARM-2T(CAN)', '1804armada02': 'ARM-4T(CAN)', '1804armada03': 'ARM-6T(CAN)', '1801armada01': 'ARM-2T(FRA)', '1801armada02': 'ARM-4T(FRA)', '1801armada03': 'ARM-6T(FRA)' } try:
def __init__(self): self.db_oper = db_helper_class(conf.db_conf)