Coder Social home page Coder Social logo

python-awis's Introduction

Attention

This package is no longer maintained. See this ticket for more info.


Wraps Alexa Web Information Service.

Usage

Making UrlInfo requests:

api = AwisApi(ACCESS_ID, SECRET_ACCESS_KEY)
tree = api.url_info("www.domain.com", "Rank", "LinksInCount")
elem = tree.find("//{%s}StatusCode" % api.NS_PREFIXES["alexa"])
assert elem.text == "Success"

Batch UrlInfo requests:

tree = api.url_info(("example1.com", "example2.com", "example3.com"), "Rank", "LinksInCount")

Making SitesLinkingIn requests:

api = AwisApi(ACCESS_ID, SECRET_ACCESS_KEY)
tree = api.sites_linking_in('metmuseum.org', count=20, start=0)
for element in tree.findall('//awis:SitesLinkingIn/awis:Site', api.NS_PREFIXES):
    print element.find('awis:Title', api.NS_PREFIXES).text
    print element.find('awis:Url', api.NS_PREFIXES).text

Batch SitesLinkingIn requests:

tree = api.sites_linking_in(['metmuseum.org', 'wikipedia.org'])

Making CategoryListings requests:

api = AwisApi(ACCESS_ID, SECRET_ACCESS_KEY)
tree = api.category_listings("Top/Business/Financial_Services")
for item in tree.findall("//{%s}DataUrl" % api.NS_PREFIXES["awis"]):
    print(item.text)

Changelog

Changes since version 1.0

  • Added support for batch requests.
  • Added SitesLinkingIn request support.

Changes since version 1.1

  • Added CategoryListings request support.

python-awis's People

Contributors

furagu avatar muhuk avatar obormot avatar pg1671 avatar tuftedocelot avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.