Exemple #1
0
 def __init__(self):
     Spider.__init__(self)
     self.url = 'http://www.alliedelec.com'
     self.headers = {
         "User-Agent":
         "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
     }
Exemple #2
0
 def __init__(self, cat_id,url, ch, rk):
     Spider.__init__(self)
     self.cat_id=cat_id
     self.url=url
     self.rk = rk
     self.ch = ch
     self.headers = {"User-Agent": "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"}
 def __init__(self):
     Spider.__init__(self)
     self.url = 'https://www.avnet.com/shop/AllProducts?countryId=us&catalogId=10001&langId=-1&storeId=715839035&deflangId=-1'
     self.headers = {
         "User-Agent":
         "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
     }
 def __init__(self, cat_id, url, channel, routingkey):
     Spider.__init__(self)
     self.cat_id = cat_id
     self.url = url
     self.headers = {}
     self.channel = channel
     self.routing_key = routingkey
 def __init__(self):
     Spider.__init__(self)
     self.url = 'http://china.rs-online.com/web'
     self.headers = {
         'User-Agent': 'Mozilla/4.0 (compatible; MSIE 6.0;'
                       'Windows NT 5.2; SV1; .NET CLR 1.1.4322)',
     }
Exemple #6
0
 def __init__(self):
     Spider.__init__(self)
     self.url = 'https://static.verical.com/prod/generated/master.json'
     self.headers = {
         'User-Agent':
         'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)',
     }
Exemple #7
0
 def __init__(self, cat_id, keywords, ch, rk):
     Spider.__init__(self)
     self.keywords = keywords
     self.cat_id = cat_id
     self.ch = ch
     self.rk = rk
     self.api_url = 'https://www.verical.com/server-webapp/api/parametricSearch?catFilter=%s&currentSaleFilter=false&facetOn=true&format=json&maxResults=15&mfrFilter=&minQFilter=0&saleTypeFilter=&searchTerm=*&sortOn=&sortOrder=&startIndex=%d'
     self.headers = {
         'User-Agent':
         'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)',
     }
 def __init__(self, cat_id, url, ch, rk):
     Spider.__init__(self)
     self.rk = rk
     self.ch = ch
     self.url = url
     self.cat_id = cat_id
     self.headers = {
         'Accept':'application/json, text/javascript, */*; q=0.01',
         'Referer':url,
         'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'+\
                 'AppleWebKit/537.36 (KHTML, like Gecko)'+\
                 'Chrome/56.0.2924.87 Safari/537.36',
         'X-Requested-With':'XMLHttpRequest',
     }
Exemple #9
0
 def __init__(self):
     Spider.__init__(self)
     self.url = 'http://www.digikey.cn/products/zh'
     self.headers = {
         'Host': 'www.digikey.cn',
         #'Connection': 'keep-alive',
         'Cache-Control': 'max-age=0',
         'Upgrade-Insecure-Requests': '1',
         'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'+\
                 ' AppleWebKit/537.36 (KHTML, like Gecko) '+\
                 'Chrome/56.0.2924.87 Safari/537.36',
         'Accept': 'text/html,application/xhtml+xml,application/'+\
                 'xml;q=0.9,image/webp,*/*;q=0.8',
         'Referer': 'http://www.digikey.cn/products/zh',
         'Accept-Encoding': 'gzip, deflate, sdch',
         'Accept-Language': 'zh-CN,zh;q=0.8',
     }
     self.product_detail_url = 'http://www.digikey.cn'
    def __init__(self, cat_id, goods_id, goods_name, goods_sn, goods_desc,
                 goods_thumb, site_url, ch, rk, is_first):
        Spider.__init__(self)

        self.cat_id = cat_id
        self.goods_id = goods_id
        self.goods_name = goods_name
        self.goods_sn = goods_sn
        self.goods_desc = goods_desc
        self.goods_thumb = goods_thumb
        self.url = site_url
        self.ch = ch
        self.rk = rk
        self.is_first = is_first
        self.headers = {
            "User-Agent":
            "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
        }
 def __init__(self, cat_id, goods_id, goods_name, goods_sn, url, pdf_url,
              ch, rk, is_first):
     Spider.__init__(self)
     self.cat_id = cat_id
     self.goods_id = goods_id
     self.goods_name = goods_name
     self.goods_sn = goods_sn
     self.url = url
     self.pdf_url = pdf_url
     self.ch = ch
     self.rk = rk
     self.is_first = is_first
     self.partId = goods_sn.split('€€')[1].split('_')[0]
     self.api_url = 'https://www.verical.com/server-webapp/'+\
             'api/getCatalogItems?format=json&includeAltern'+\
             'ates=false&mpnIDs=%s&t=1491444986908'
     self.headers = {
         'User-Agent': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2;'+\
                 'SV1; .NET CLR 1.1.4322)',
     }
 def __init__(self, cat_id, goods_id, goods_name, goods_sn, site_url,
              provider_name, goods_thumb, goods_img, goods_desc, ch, rk,
              is_first):
     Spider.__init__(self)
     self.cat_id = cat_id
     self.goods_id = goods_id
     self.goods_name = goods_name
     self.goods_sn = goods_sn
     self.url = site_url
     self.provider_name = provider_name
     self.goods_thumb = goods_thumb
     self.goods_img = goods_img
     self.goods_desc = goods_desc
     self.ch = ch
     self.rk = rk
     self.is_first = is_first
     self.headers = {
         'User-Agent':
         'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)',
     }
 def __init__(self, cat_id, goods_id, goods_sn, url, pdf_url, ch,
              routingkey, is_first):
     Spider.__init__(self)
     self.cat_id = cat_id
     self.goods_id = goods_id
     self.goods_sn = goods_sn
     self.url = url
     self.pdf_url = pdf_url
     self.headers = {
         'Host': 'www.digikey.cn',
         'Cache-Control': 'max-age=0',
         'Upgrade-Insecure-Requests': '1',
         'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) '+\
                 'AppleWebKit/537.36 (KHTML, like Gecko) '+\
                 'Chrome/56.0.2924.87 Safari/537.36',
         'Accept': 'text/html,application/xhtml+xml,application/xml'+\
                 ';q=0.9,image/webp,*/*;q=0.8',
         'Accept-Encoding': 'gzip, deflate, sdch',
         'Accept-Language': 'zh-CN,zh;q=0.8',
     }
     self.ch = ch
     self.routingkey = routingkey
     self.is_first = is_first