npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aliexpress

v0.2.2

Published

A aliexpress spider

Downloads

7

Readme

Ali Express Spider

This is a spider for AliExpress written in Node.

npm Travis AppVeyor

Install

npm install aliexpress --save

Features

  • Get Best Selling List
  • Get Item Detail
  • Get Search Result

Usage

Get Best Selling List

var AliExpressSpider = require('aliexpress');

AliExpressSpider.BestSelling.get().then(function(goods){
  console.log('Best Selling items:', goods);
});

Result sample:

[
  {
    url: 'http://www.aliexpress.com/item/2015-Original-Micro-USB-Cable-with-Colorful-Nylon-Line-Metal-plug-for-iPhone-6-Plus-5s/32470659404.html?scm=1007.13442.37932.0&pvid=6092a253-929e-42ba-b75b-64fba51eed52&tpp=1',
    name: 'Bastec USB Data Charger Cable Nylon Braided Wire Met...',
    price: 'US $2.49'
  }
]

Get Good Detail

var AliExpressSpider = require('aliexpress');

AliExpressSpider.Detail(url).then(function(detail){
  console.log('good detail', detail);
}, function(reason){
  // error handler
});

Result sample:

{
  productId: '32470659404',
  name: 'Bastec USB Data Charger Cable Nylon Braided Wire Metal Plug Micro USB Cable for iPhone 6 6s Plus 5s 5 iPad mini Samsung Sony HTC',
  gallary:
   [ { alt: 'Bastec USB Data Charger Cable Nylon Braided Wire Metal Plug Micro USB Cable for iPhone 6 6s Plus 5s 5 iPad mini Samsung Sony HTC',
       src: 'http://g03.a.alicdn.com/kf/HTB1yK1RMVXXXXcDXXXXq6xXFXXXr/Bastec-USB-Data-Charger-Cable-Nylon-Braided-Wire-Metal-Plug-Micro-USB-Cable-for-iPhone-6.jpg_50x50.jpg' },
     { alt: 'Bastec USB Data Charger Cable Nylon Braided Wire Metal Plug Micro USB Cable for iPhone 6 6s Plus 5s 5 iPad mini Samsung Sony HTC',
       src: 'http://g04.a.alicdn.com/kf/HTB19ttPLVXXXXa_XFXXq6xXFXXXa/Bastec-USB-Data-Charger-Cable-Nylon-Braided-Wire-Metal-Plug-Micro-USB-Cable-for-iPhone-6.jpg_50x50.jpg' },
      ...
    ],
  property:
   [ { title: 'Brand Name:', des: 'bastec' },
     { title: 'Compatible Brand:',
       des: 'SONY,LG,Toshiba,Apple iPhones,Samsung,Panasonic,HTC' }
       ...
     ]
  orderCount: 40712
},

Get Search Result

var AliExpressSpider = require('aliexpress');

AliExpressSpider.Search({
  keyword: 'iPad',
  page: 2
}).then(function(d){
  console.log('d', d)
})

Result sample:

{
  url: 'https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20170201171227&SearchText=iPad$page=2',
  list: [
    {
      title: '330Pcs/page Cute Cartoon Rubber Home Button Sticker for iPhone 4 4s 5G 5S ipad 2 3 4 5 Practical 4Z338',
      url: '//www.aliexpress.com/item/330Pcs-lot-Cute-Cartoon-Rubber-Home-Button-Sticker-for-iPhone-4-4s-5G-5S-ipad-2/32247854668.html?ws_ab_test=searchweb0_0,searchweb201602_2_10066_10065_10000073_10068_10000077_10000074_10000032_119_10000030_10000026_10000023_431_10000069_10000068_10060_10062_10056_10055_10000062_10054_10000063_10059_10099_10000020_10000013_10103_10102_10000016_10096_10000056_10000059_10052_10053_10107_10050_10106_10051_10000097_10000094_10000091_10000007_10000050_10084_10083_10000100_10080_10000047_10082_10081_10110_10111_10112_10113_10114_10115_10000089_10000086_10000083_10000041_10000044_10000080_10078_10079_10000038_10073_10000035_10070_10122_10123_10121_10124,searchweb201603_1,afswitch_4,ppcSwitch_5,single_sort_1_default&btsid=e7d779b1-077c-429f-885d-101f9852fb1c&algo_expid=b26690be-6119-4b09-a0e6-95657992ae47-0&algo_pvid=b26690be-6119-4b09-a0e6-95657992ae47',
      id: '32247854668',
      price: 'US $1.89',
      img: 'https://ae01.alicdn.com/kf/HTB1qfmMKFXXXXaFaXXXq6xXFXXXC/330Pcs-lot-Cute-Cartoon-Rubber-Home-Button-Sticker-for-iPhone-4-4s-5G-5S-ipad-2.jpg',
      store: {
        name: 'Craft World',
        url: '//www.aliexpress.com/store/1200888'
      }
    },
    ...
  ]
}