用正则写了一个爬TOP API的脚本,126行,但排版的python语句写得很烂,不好意思贴代码了,贴一下结果吧。如果以后更新API,就再运行脚本,比较一下生产的结果或者文件大小,就知道API有没有变化了。

#This File is auto created at 2009-08-23 12:15:02.500000
API_LIST = {
‘taobao’: {
‘user’: {
#taobao.user.get :得到单个用户信息 [查]
‘get’: [
(‘fields’, list, []),
(’nick’, list, []),
],},
‘users’: {
#taobao.users.get :获取多个用户信息 [查]
‘get’: [
(‘fields’, list, []),
(’nicks’, list, []),
],},
‘product’: {
#taobao.product.get :获取一个产品的信息 [卖]
‘get’: [
(‘fields’, list, []),
(‘product_id’, list, []),
(‘props’, list, []),
],},
‘products’: {
#taobao.products.search :搜索产品信息 [卖]
‘search’: [
(‘fields’, list, []),
(‘q’, list, []),
(‘cid’, list, []),
(‘props’, list, []),
(‘page_size’, int, []),
(‘page_no’, int, []),
],},
‘product’: {
#taobao.product.add :上传一个产品,不包括产品非主图和属性图片 [商]
‘add’: [
(‘cid’, list, []),
(‘outer_id’, list, []),
(’name’, list, []),
(‘price’, list, []),
(‘desc’, list, []),
],},
‘product’: {
‘img’: {
#taobao.product.img.upload :上传单张产品非主图,如果需要传多张,可调多次 [商]
‘upload’: [
(‘pic_id’, list, []),
(‘product_id’, list, []),
(‘position’, int, []),
(‘is_major’, str, []),
],},},
‘product’: {
‘propimg’: {
#taobao.product.propimg.upload :上传单张产品属性图片,如果需要传多张,可调多次 [商]
‘upload’: [
(‘pic_id’, list, []),
(‘product_id’, list, []),
(‘props’, list, []),
(‘position’, int, []),
],},},
‘product’: {
#taobao.product.update :修改一个产品,可以修改主图,不能修改子图片 [商]
‘update’: [
(‘product_id’, list, []),
(‘outer_id’, list, []),
(’name’, list, []),
(‘price’, list, []),
(‘desc’, list, []),
],},
‘products’: {
#taobao.products.get :获取产品列表 [卖]
‘get’: [
(‘fields’, list, []),
(’nick’, list, []),
(‘page_size’, int, []),
(‘page_no’, int, []),
],},
‘product’: {
‘img’: {
#taobao.product.img.delete :删除产品非主图 [商]
‘delete’: [
(‘pic_id’, list, []),
(‘product_id’, list, []),
],},},
‘product’: {
‘propimg’: {
#taobao.product.propimg.delete :删除产品属性图 [商]
‘delete’: [
(‘pic_id’, list, []),
(‘product_id’, list, []),
],},},
‘itempropvalues’: {
#taobao.itempropvalues.get :获取标准类目属性值 [查]
‘get’: [
(‘fields’, list, []),
(‘pvs’, list, []),
(‘datetime’, str, []),
],},
‘items’: {
#taobao.items.get :搜索商品信息(返回值没有ItemCategory) [查]
‘get’: [
(‘fields’, list, []),
(‘q’, list, []),
(’nicks’, list, []),
(‘cid’, list, []),
(‘props’, list, []),
(‘product_id’, list, []),
(‘start_price’, list, []),
(’end_price’, list, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
(‘order_by’, list, []),
(‘ww_status’, str, []),
(‘post_free’, str, []),
{
‘location’:[
(‘state’, list,  []),
(‘city’, list,  []),
],
},
],},
‘items’: {
#taobao.items.search :搜索商品全部信息(返回值有ItemCategory) [查]
‘search’: [
(‘fields’, list, []),
(‘q’, list, []),
(‘cid’, list, []),
(’nicks’, list, []),
(‘props’, list, []),
(‘product_id’, list, []),
(‘start_price’, list, []),
(’end_price’, list, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
(‘order_by’, list, []),
(‘ww_status’, str, []),
(‘post_free’, str, []),
{
‘location’:[
(‘state’, list,  []),
(‘city’, list,  []),
],
},
],},
‘items’: {
‘onsale’: {
#taobao.items.onsale.get :得到当前会话用户出售中的商品列表 [买]
‘get’: [
(‘fields’, list, []),
(‘q’, list, []),
(‘cid’, list, []),
(‘seller_cids’, list, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
(‘has_discount’, str, []),
(‘has_showcase’, str, []),
(‘order_by’, list, []),
],},},
‘items’: {
‘all’: {
#taobao.items.all.get :得到当前会话用户的商品列表 [卖]
‘get’: [
(‘fields’, list, []),
(‘q’, list, []),
(‘cid’, list, []),
(‘seller_cids’, list, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
(‘order_by’, list, []),
],},},
‘item’: {
#taobao.item.get :得到单个商品信息 [查]
‘get’: [
(‘fields’, list, []),
(’nick’, list, []),
(‘iid’, list, []),
(’num_iid’, list, []),
],},
‘item’: {
#taobao.item.update :更新商品信息 [卖]
‘update’: [
(‘iid’, list, []),
(‘approve_status’, list, []),
(’num’, list, []),
(‘price’, list, []),
(’title’, list, []),
(‘desc’, list, []),
(‘freight_payer’, list, []),
(‘valid_thru’, list, []),
(‘has_invoice’, list, []),
(‘has_warranty’, list, []),
(‘auto_repost’, list, []),
(‘has_showcase’, list, []),
(‘has_discount’, list, []),
(‘post_fee’, list, []),
(’express_fee’, list, []),
(’ems_fee’, list, []),
(’list_time’, list, []),
(‘increment’, list, []),
(‘stuff_status’, list, []),
(‘auction_point’, list, []),
(‘property_alias’, list, []),
(‘seller_cids’, list, []),
(‘postage_id’, list, []),
(’lang’, list, []),
(‘outer_id’, list, []),
{
‘location’:[
(‘state’, list,  []),
(‘city’, list,  []),
],
},
],},
‘item’: {
#taobao.item.add :添加一个商品 [卖]
‘add’: [
(’num’, list, []),
(‘price’, list, []),
(’type’, list, []),
(‘stuff_status’, list, []),
(’title’, list, []),
(‘desc’, list, []),
(‘approve_status’, list, []),
(‘freight_payer’, list, []),
(‘valid_thru’, list, []),
(‘has_invoice’, list, []),
(‘has_warranty’, list, []),
(‘auto_repost’, list, []),
(‘has_showcase’, list, []),
(‘seller_cids’, list, []),
(‘has_discount’, list, []),
(‘post_fee’, list, []),
(’express_fee’, list, []),
(’ems_fee’, list, []),
(’list_time’, list, []),
(‘increment’, list, []),
(‘postage_id’, list, []),
(‘auction_point’, list, []),
(‘property_alias’, list, []),
(‘sku_quantities’, list, []),
(‘sku_prices’, list, []),
(‘sku_outer_ids’, list, []),
(’lang’, list, []),
(‘outer_id’, list, []),
(‘product_id’, list, []),
{
‘location’:[
(‘state’, list,  []),
(‘city’, list,  []),
],
},
],},
‘item’: {
‘img’: {
#taobao.item.img.upload :添加商品图片 [卖]
‘upload’: [
(‘itemimg_id’, list, []),
(‘iid’, list, []),
(‘position’, list, []),
(‘is_major’, str, []),
],},},
‘item’: {
‘img’: {
#taobao.item.img.delete :删除商品图片 [卖]
‘delete’: [
(‘itemimg_id’, list, []),
(‘iid’, list, []),
],},},
‘item’: {
‘propimg’: {
#taobao.item.propimg.delete :删除属性图片 [卖]
‘delete’: [
(‘propimg_id’, list, []),
(‘iid’, list, []),
],},},
‘item’: {
‘propimg’: {
#taobao.item.propimg.upload :添加或修改属性图片 [卖]
‘upload’: [
(‘iid’, list, []),
(‘properties’, list, []),
(‘propimg_id’, list, []),
(‘position’, list, []),
],},},
‘item’: {
‘sku’: {
#taobao.item.sku.add :添加SKU [卖]
‘add’: [
(‘iid’, list, []),
(‘properties’, list, []),
(‘quantity’, list, []),
(‘price’, list, []),
(‘outer_id’, list, []),
(’lang’, list, []),
],},},
‘item’: {
‘sku’: {
#taobao.item.sku.get :获取SKU [查]
‘get’: [
(‘fields’, list, []),
(‘sku_id’, list, []),
(’nick’, list, []),
],},},
‘item’: {
‘sku’: {
#taobao.item.sku.update :更新SKU信息 [卖]
‘update’: [
(‘iid’, list, []),
(‘properties’, list, []),
(‘quantity’, list, []),
(‘price’, list, []),
(‘outer_id’, list, []),
(’lang’, list, []),
],},},
‘item’: {
‘skus’: {
#taobao.item.skus.get :根据卖家昵称和商品ID列表获取SKU信息 [查]
‘get’: [
(‘fields’, list, []),
(‘iids’, list, []),
(’nick’, list, []),
],},},
‘item’: {
‘update’: {
#taobao.item.update.delisting :商品下架 [高]
‘delisting’: [
(‘iid’, list, []),
],},},
‘item’: {
‘update’: {
#taobao.item.update.listing :一口价商品上架  [高]
‘listing’: [
(‘iid’, list, []),
(’num’, list, []),
],},},
‘postages’: {
#taobao.postages.get :获取卖家的运费模板 [卖]
‘get’: [
(‘fields’, list, []),
],},
‘postage’: {
#taobao.postage.add :添加邮费模板 [卖]
‘add’: [
(’name’, list, []),
(‘post_increase’, list, []),
(’express_increase’, list, []),
(‘memo’, list, []),
(‘postage_mode_types’, list, []),
(‘postage_mode_dests’, list, []),
(‘postage_mode_prices’, list, []),
(‘postage_mode_increases’, list, []),
],},
‘postage’: {
#taobao.postage.update :修改邮费模板 [商]
‘update’: [
(‘postage_id’, list, []),
(‘post_increase’, list, []),
(’express_increase’, list, []),
(’name’, list, []),
(‘memo’, list, []),
(‘postage_mode_ids’, list, []),
(‘postage_mode_types’, list, []),
(‘postage_mode_dests’, list, []),
(‘postage_mode_prices’, list, []),
(‘postage_mode_increases’, list, []),
(‘postage_mode_optTypes’, list, []),
],},
‘postage’: {
#taobao.postage.get :获取单个运费模板 [卖]
‘get’: [
(‘fields’, list, []),
(‘postage_id’, list, []),
(’nick’, list, []),
],},
‘postage’: {
#taobao.postage.delete :删除邮费模板 [商]
‘delete’: [
(‘postage_id’, list, []),
],},
‘taobaoke’: {
‘items’: {
#taobao.taobaoke.items.get : 淘宝客商品查询 [佣]
‘get’: [
(‘fields’, list, []),
(‘pid’, list, []),
(‘keyword’, list, []),
(‘cid’, list, []),
(‘start_price’, list, []),
(’end_price’, list, []),
(‘auto_send’, str, []),
(‘area’, list, []),
(‘start_credit’, list, []),
(’end_credit’, list, []),
(‘sort’, list, []),
(‘is_guarantee’, str, []),
(‘start_commission’, list, []),
(’end_commission’, list, []),
(‘start_commissionRate’, list, []),
(’end_commissionRate’, list, []),
(‘start_commissionNum’, list, []),
(’end_commissionNum’, list, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
],},},
‘taobaoke’: {
‘items’: {
#taobao.taobaoke.items.convert : 淘宝客商品转换 [佣]
‘convert’: [
(‘fields’, list, []),
(‘iids’, list, []),
(’nick’, list, []),
(‘outer_code’, list, []),
],},},
‘taobaoke’: {
‘shops’: {
#taobao.taobaoke.shops.convert : 淘宝客店铺转换 [佣]
‘convert’: [
(‘fields’, list, []),
(‘sids’, list, []),
(’nick’, list, []),
(‘outer_code’, list, []),
],},},
‘taobaoke’: {
‘listurl’: {
#taobao.taobaoke.listurl.get : 淘宝客关键字搜索URL [佣]
‘get’: [
(‘q’, list, []),
(’nick’, list, []),
(‘outer_code’, list, []),
],},},
‘taobaoke’: {
‘report’: {
#taobao.taobaoke.report.get : 淘宝客报表查询 [佣]
‘get’: [
(‘fields’, list, []),
(‘date’, list, []),
],},},
‘trades’: {
‘bought’: {
#taobao.trades.bought.get :搜索当前会话用户作为买家达成的交易记录 [买]
‘get’: [
(‘fields’, list, []),
(‘start_created’, str, []),
(’end_created’, str, []),
(’title’, list, []),
(‘status’, list, []),
(‘seller_nick’, list, []),
(’type’, list, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
],},},
‘trades’: {
‘sold’: {
#taobao.trades.sold.get :搜索当前会话用户作为卖家已卖出的交易数据 [买]
‘get’: [
(‘fields’, list, []),
(‘start_created’, str, []),
(’end_created’, str, []),
(’title’, list, []),
(‘status’, list, []),
(‘buyer_nick’, list, []),
(’type’, list, []),
(‘rate_status’, list, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
],},},
‘trades’: {
‘sold’: {
‘increment’: {
#taobao.trades.sold.increment.get :搜索当前会话用户作为卖家已卖出的增量交易数据 [高]
‘get’: [
(‘fields’, list, []),
(‘status’, list, []),
(‘start_modified’, str, []),
(’end_modified’, str, []),
(’type’, list, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
],},},},
‘trade’: {
#taobao.trade.get :取到单笔交易的部分信息(性能高) [买]
‘get’: [
(‘fields’, list, []),
(’tid’, list, []),
],},
‘trade’: {
‘fullinfo’: {
#taobao.trade.fullinfo.get :取到单笔交易的详细信息 [商]
‘get’: [
(‘fields’, list, []),
(’tid’, list, []),
],},},
‘trade’: {
#taobao.trade.close :卖家关闭一笔交易 [高]
‘close’: [
(’tid’, list, []),
(‘close_reason’, list, []),
],},
‘trade’: {
‘memo’: {
#taobao.trade.memo.add :对一笔交易添加备注 [商]
‘add’: [
(‘memo’, list, []),
(’tid’, list, []),
],},},
‘trade’: {
‘memo’: {
#taobao.trade.memo.update :修改一笔交易备注 [商]
‘update’: [
(’tid’, list, []),
(‘memo’, list, []),
],},},
‘refunds’: {
‘apply’: {
#taobao.refunds.apply.get :查询买家申请的退款列表 [专]
‘get’: [
(‘fields’, list, []),
(‘status’, list, []),
(‘seller_nick’, list, []),
(’type’, list, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
],},},
‘refunds’: {
‘receive’: {
#taobao.refunds.receive.get :查询卖家收到的退款列表 [专]
‘get’: [
(‘fields’, list, []),
(‘status’, list, []),
(‘buyer_nick’, list, []),
(’type’, list, []),
(‘start_modified’, str, []),
(’end_modified’, str, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
],},},
‘refund’: {
#taobao.refund.get :查询单笔退款详情 [专]
‘get’: [
(‘fields’, list, []),
(‘refund_id’, list, []),
],},
‘trade’: {
‘confirmfee’: {
#taobao.trade.confirmfee.get :获取交易确认收货费用 [高]
‘get’: [
(’tid’, list, []),
(‘is_detail’, list, []),
],},},
‘refund’: {
‘message’: {
#taobao.refund.message.add :创建退款留言/凭证 [专]
‘add’: [
(‘content’, list, []),
(‘owner_nick’, list, []),
(‘refund_id’, list, []),
],},},
‘refund’: {
‘messages’: {
#taobao.refund.messages.get :退款留言/凭证列表查询 [专]
‘get’: [
(‘fields’, list, []),
(‘refund_id’, list, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
],},},
‘traderates’: {
#taobao.traderates.get :搜索评价信息 [专]
‘get’: [
(‘fields’, list, []),
(‘rate_type’, list, []),
(‘role’, list, []),
(‘result’, list, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
],},
‘traderate’: {
#taobao.traderate.add :新增单个评价 [专]
‘add’: [
(’tid’, list, []),
(‘order_id’, list, []),
(‘content’, list, []),
(‘result’, list, []),
(‘anony’, list, []),
(‘role’, list, []),
],},
‘traderate’: {
‘list’: {
#taobao.traderate.list.add :针对父子订单新增批量评价 [专]
‘add’: [
(’tid’, list, []),
(‘content’, list, []),
(‘result’, list, []),
(‘anony’, list, []),
(‘role’, list, []),
],},},
‘areas’: {
#taobao.areas.get :查询标准地区码 [查]
‘get’: [
(‘fields’, list, []),
],},
‘logisticcompanies’: {
#taobao.logisticcompanies.get :查询物流公司信息 [查]
‘get’: [
(‘fields’, list, []),
(‘is_recommended’, str, []),
(‘orderMode’, list, []),
],},
‘delivery’: {
#taobao.delivery.send :发货处理 [高]
‘send’: [
(’tid’, list, []),
(‘orderType’, list, []),
(‘company_code’, list, []),
(‘out_sid’, list, []),
(‘seller_name’, list, []),
(‘seller_area_id’, list, []),
(‘seller_address’, list, []),
(‘seller_zip’, list, []),
(‘seller_phone’, list, []),
(‘seller_mobile’, list, []),
(‘memo’, list, []),
],},
‘shopcats’: {
‘list’: {
#taobao.shopcats.list.get :获取前台展示的店铺类目 [查]
‘get’: [
],},},
‘sellercats’: {
‘list’: {
#taobao.sellercats.list.get :获取前台展示的店铺内卖家自定义商品类目 [查]
‘get’: [
(’nick’, list, []),
],},},
‘sellercats’: {
‘list’: {
#taobao.sellercats.list.add :添加卖家自定义类目 [卖]
‘add’: [
(’name’, list, []),
(‘pict_url’, list, []),
(‘parent_cid’, list, []),
(‘sort_order’, int, []),
],},},
‘sellercats’: {
‘list’: {
#taobao.sellercats.list.update :更新卖家自定义类目 [卖]
‘update’: [
(‘cid’, list, []),
(’name’, list, []),
(‘pict_url’, list, []),
(‘sort_order’, int, []),
],},},
‘shop’: {
#taobao.shop.get :获取卖家店铺的基本信息 [查]
‘get’: [
(‘fields’, list, []),
(’nick’, list, []),
],},
‘shop’: {
#taobao.shop.update :更新店铺基本信息,目前只支持标题、公告和描述 [卖]
‘update’: [
(’title’, list, []),
(‘bulletin’, list, []),
(‘desc’, list, []),
],},
‘sns’: {
‘pictures’: {
#taobao.sns.pictures.getAlbums :取得用户相册列表 [社]
‘getAlbums’: [
(‘uid’, int, []),
(‘start_row’, int, []),
(‘count’, int, []),
],},},
‘sns’: {
‘pictures’: {
#taobao.sns.pictures.get :取得用户某一相册图片 [社]
‘get’: [
(‘uid’, int, []),
(‘album_id’, int, []),
(‘start_row’, int, []),
(‘count’, int, []),
],},},
‘sns’: {
‘picture’: {
#taobao.sns.picture.add :保存图片到社区相册里 [社]
‘add’: [
(‘picture’, str, []),
],},},
‘sns’: {
‘picture’: {
#taobao.sns.picture.setUsed :使照片的状态变成被插件使用的状态 [社]
‘setUsed’: [
],},},
‘sns’: {
‘activity’: {
#taobao.sns.activity.add :添加动态消息 [社]
‘add’: [
],},},
‘sns’: {
‘message’: {
#taobao.sns.message.sysSend :发送系统消息  [社]
‘sysSend’: [
(’to_uid’, int, []),
],},},
‘sns’: {
‘message’: {
#taobao.sns.message.send :发送消息 [社]
‘send’: [
(’to_uid’, int, []),
],},},
‘sns’: {
‘friends’: {
#taobao.sns.friends.get :查找用户好友  [社]
‘get’: [
(‘uid’, int, []),
(‘start_row’, int, []),
(‘count’, int, []),
],},},
‘sns’: {
‘friends’: {
#taobao.sns.friends.areFriends :判断两个是否为好友 [社]
‘areFriends’: [
(‘uid1’, int, []),
(‘uid2’, int, []),
],},},
‘sns’: {
‘user’: {
#taobao.sns.user.get :取得社区用户基本信息 [社]
‘get’: [
(‘uid’, int, []),
],},},
‘sns’: {
‘coins’: {
#taobao.sns.coins.consume :兑换淘金币 [社]
‘consume’: [
(‘coin_count’, int, []),
],},},
‘sns’: {
‘coins’: {
#taobao.sns.coins.sum :查找个人淘金币数 [社]
‘sum’: [
(’noinput’, list, []),],},},
‘picture’: {
#taobao.picture.upload :上传一张图片 [媒]
‘upload’: [
(‘picture_category_id’, str, []),
(‘image_input_title’, list, []),
(’title’, list, []),
],},
‘picture’: {
#taobao.picture.delete :删除一张图片 [媒]
‘delete’: [
(‘picture_ids’, list, []),
],},
‘picture’: {
#taobao.picture.get :查询图片 [媒]
‘get’: [
(‘fields’, list, []),
(‘picture_id’, int, []),
(‘picture_category_id’, str, []),
(‘deleted’, str, []),
(‘modified_time’, str, []),
(’title’, list, []),
(‘order_by’, list, []),
(‘page_no’, int, []),
(‘page_size’, int, []),
(‘start_date’, str, []),
(’end_date’, str, []),
],},
‘picture’: {
‘category’: {
#taobao.picture.category.get :查询图片分类 [媒]
‘get’: [
(‘fields’, list, []),
(‘picture_category_id’, int, []),
(‘picture_category_name’, list, []),
(’type’, list, []),
],},},
}
}