代码之家  ›  专栏  ›  技术社区  ›  Ben G

查找一本书的版本

  •  7
  • Ben G  · 技术社区  · 15 年前

    有没有一种方法可以使用亚马逊产品广告API,根据图书的ISBN查找不同版本的图书?

    而且,更一般地说,在一本书上查找版本元数据有哪些不同的选择?我只知道一个肯定的是来自Worldcat的XISBN API

    在我的网站上,我们有一个“更多版本”按钮,当人们搜索书籍时。所以我会做很多查询(并缓存它们)。

    5 回复  |  直到 11 年前
        1
  •  3
  •   AlexAtStack    12 年前

    看一看 https://sourceforge.net/projects/isbntools/files/latest/download . 命令 isbn editions ISBN 会给你想要的…

    如果你是一个开发者,你有 https://pypi.python.org/pypi/isbntools .

        2
  •  4
  •   outcassed    15 年前

    你可以用OCLC xISBN API -给它一个isbn,它会给你一套所有的isbn,它们是相同的“作品”——其他版本,翻译,等等。它会给你这样的东西:

    <?xml version="1.0" encoding="UTF-8"?>
    <rsp xmlns="http://worldcat.org/xid/isbn/" stat="ok">
        <isbn form="BA" year="2004" lang="eng" ed="2nd ed.">0596002815</isbn>
        <isbn form="BA DA" year="1999" lang="eng">1565928938</isbn>
        <isbn form="BA" year="1999" lang="eng" ed="1st ed.">1565924649</isbn>
    </rsp>
    

    不幸的是,它不是免费的。 Here is the pricing .

        3
  •  3
  •   BenMorel Manish Pradhan    11 年前

    这个问题由来已久,但为了完整起见,我要补充一点,亚马逊产品广告API确实提供了一种查找书籍其他版本(和ISBN号)的方法,但这涉及两个方面 ItemLookup 查询:

    • 获取父项asin的第一个查询,Amazon调用它 授权不可购买 ;这是一个没有产品页面的虚拟产品,只是一个儿童产品的容器。
    • 第二个查询列出此父级的子项。

    两个查询都必须包含以下参数:

    • ResponseGroup=RelatedItems,ItemAttributes
    • RelationshipType=AuthorityTitle

    第一个带有ISBN号的查询如下所示:

    ...&IdType=ISBN&ItemId=9780345803481

    <RelatedItems>
        <Relationship>Parents</Relationship>
        <RelationshipType>AuthorityTitle</RelationshipType>
        <RelatedItemCount>1</RelatedItemCount>
        <RelatedItemPageCount>1</RelatedItemPageCount>
        <RelatedItemPage>1</RelatedItemPage>
        <RelatedItem>
            <Item>
                <ASIN>B0058NLWEC</ASIN>
                ...
            </Item>
        </RelatedItem>
    </RelatedItems>
    

    第二个查询使用第一个查询返回的父asin执行, B0058NLWEC :

    ...&IdType=ASIN&ItemId=B0058NLWEC

    <RelatedItems>
        <Relationship>Children</Relationship>
        <RelationshipType>AuthorityTitle</RelationshipType>
        <RelatedItemCount>42</RelatedItemCount>
        <RelatedItemPageCount>5</RelatedItemPageCount>
        <RelatedItemPage>1</RelatedItemPage>
        <RelatedItem>
            <Item>
                <ASIN>1445026570</ASIN>
                <ItemAttributes>
                    <EAN>9781445026572</EAN>
                    <ISBN>1445026570</ISBN>
                    ...
                </ItemAttributes>
                ...
            </Item>
        </RelatedItem>
        <RelatedItem>
            <Item>
                <ASIN>1471305015</ASIN>
                <ItemAttributes>
                    <EAN>9781471305016</EAN>
                    <ISBN>1471305015</ISBN>
                    ...
                </ItemAttributes>
                ...
            </Item>
        </RelatedItem>
        ...
    </RelatedItems>
    

    这列出了亚马逊所知的这本书的所有版本:精装本、平装本、Kindle、有声读物……

        4
  •  2
  •   BenMorel Manish Pradhan    11 年前

    ISBN数据库提供 a remote access API 它将返回格式化为XML的各种元数据。从浏览他们网站上的条目来看,一些ISBN条目也包括了版本信息。

    查看此API示例响应:

    <?xml version="1.0" encoding="UTF-8"?>
    <ISBNdb server_time="2005-07-29T03:02:22">
     <BookList total_results="1">
      <BookData book_id="paul_laurence_dunbar" isbn="0766013502">
       <Title>Paul Laurence Dunbar</Title>
       <TitleLong>Paul Laurence Dunbar: portrait of a poet</TitleLong>
       <AuthorsText>Catherine Reef</AuthorsText>
       <PublisherText publisher_id="enslow_publishers">
        Berkeley Heights, NJ: Enslow Publishers, c2000.
       </PublisherText>
       <Summary>
        A biography of the poet who faced racism and devoted himself
        to depicting the black experience in America.
       </Summary>
       <Notes>
        "Works by Paul Laurence Dunbar": p. 113-114.
        Includes bibliographical references (p. 124) and index.
       </Notes>
       <UrlsText></UrlsText>
       <AwardsText></AwardsText>
       <Prices>
        <Price store_id="alibris" is_in_stock="1" is_new="0"
               check_time="2005-07-29T01:18:18" price="14.92"/>
        <Price store_id="amazon" is_in_stock="1" is_new="1"
               check_time="2005-07-29T01:18:20" price="26.60" />
       </Prices>
      </BookData>
     </BookList>
    </ISBNdb>
    

    此外,这里是 specific documentation “books collection”响应xml中的属性。

        5
  •  0
  •   Ankur Gupta    15 年前

    1)标题相同的搜索 2)对响应列表进行迭代(对于大多数书籍,应该是5-10个结果,具有诸如“python programming”之类的通用标题的书籍将产生大量结果,因此可能无法得到结果) 3)参见ISBN号+发布日期的差异。

    我不记得有直接的API。