Skip to content
/ qzone-api Public

⭐️ Node.js Qzone API service

License

Notifications You must be signed in to change notification settings

u3u/qzone-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qzone API

NPM version NPM downloads CircleCI codecov Prettier code style XO code style

Install

yarn add qzone-api

Usage

const QzoneApi = require('qzone-api')
;(async () => {
  const { user, cookies } = await QzoneApi.login(
    'your account',
    'your password'
  )
  // Get user information
  console.log(user) // { login: true, owner: true, token: 'xxx' }

  const p_uin = cookies.find(x => x.name === 'p_uin').value
  const p_skey = cookies.find(x => x.name === 'p_skey').value

  // Get all albums for this user
  const { vFeeds } = await QzoneApi.getAlbumList({
    p_uin,
    p_skey,
    g_tk: token,
    res_uin: '1542262366'
  })

  // Get the first 200 photos in 1542262366's first album
  const { photos, total_count } = await QzoneApi.getPhotoList({
    p_uin,
    p_skey,
    g_tk: token,
    uin: '1542262366',
    albumid: vFeeds[0].pic.albumid
  })
  // Get the total number of photos
  console.log(total_count)
  // Get all the picture address
  console.log(
    [].concat(...Object.values(photos).map(x => x.map(x => x[1].url)))
  )
})()

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

Qzone API © u3u, Released under the MIT License.
Authored and maintained by u3u with help from contributors (list).

qwq.cat · GitHub @u3u

About

⭐️ Node.js Qzone API service

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published