LetGo API的API文档

时间:2019-06-21 14:02:30

标签: python api

我一直在审查Letgo API的刮擦代码(Update Parameter for Web Scraping With Infinite Scroll),并且正在构建自己的python脚本修改。我正在寻找Letgo的API文档,甚至从别人的经验中寻找细节。

所使用的URL包括用于定义国家/地区,距离类型,返回的结果数和偏移量的配置。一切都很棒,但是正在寻找可以使用的其他任何东西,例如:类别,名称,城市或具有地理位置的任何东西。

scrapy中的示例URL是: https://search-products-pwa.letgo.com/api/products?country_code=US&offset=0&quadkey=0320030123201&num_results=50&distance_type=mi

对于“类别”,我尝试了可预测的类别(类别,category_id,cat,cat_id),并将其分配为已知的category_id。同样,城市也没有运气。

下面是返回对象的示例。

{
"thumb": {
"url": "https://img.letgo.com/images/43/79/0d/1f/43790d1f3dc726808e0f8df022eb4351.jpg?impolicy=img_200",
"width": 1024,
"height": 1024
},
"images": [
{
"url": "https://img.letgo.com/images/43/79/0d/1f/43790d1f3dc726808e0f8df022eb4351.jpg",
"id": "ab0422d1-ecf6-4fbd-9467-9b3c243a8ae2"
},
{
"url": "https://img.letgo.com/images/f8/89/3a/81/f8893a819042d82a08e2f498441ff4c4.jpg",
"id": "be674e21-7eb3-48e9-a164-f9a8c7739fbc"
},
{
"url": "https://img.letgo.com/images/35/4f/f5/3c/354ff53ced44cd447aa80583318120c7.jpg",
"id": "cad102b4-5ed5-42de-8cd4-9ac59439a38f"
}
],
"media": [
{
"id": "ab0422d1-ecf6-4fbd-9467-9b3c243a8ae2",
"media_type": "image",
"snapshot_id": "ab0422d1-ecf6-4fbd-9467-9b3c243a8ae2",
"outputs": {
"image": "https://img.letgo.com/images/43/79/0d/1f/43790d1f3dc726808e0f8df022eb4351.jpg",
"image_thumb": "https://img.letgo.com/images/43/79/0d/1f/43790d1f3dc726808e0f8df022eb4351.jpg?impolicy=img_200"
}
},
{
"id": "be674e21-7eb3-48e9-a164-f9a8c7739fbc",
"media_type": "image",
"snapshot_id": "be674e21-7eb3-48e9-a164-f9a8c7739fbc",
"outputs": {
"image": "https://img.letgo.com/images/f8/89/3a/81/f8893a819042d82a08e2f498441ff4c4.jpg",
"image_thumb": "https://img.letgo.com/images/f8/89/3a/81/f8893a819042d82a08e2f498441ff4c4.jpg?impolicy=img_200"
}
},
{
"id": "cad102b4-5ed5-42de-8cd4-9ac59439a38f",
"media_type": "image",
"snapshot_id": "cad102b4-5ed5-42de-8cd4-9ac59439a38f",
"outputs": {
"image": "https://img.letgo.com/images/35/4f/f5/3c/354ff53ced44cd447aa80583318120c7.jpg",
"image_thumb": "https://img.letgo.com/images/35/4f/f5/3c/354ff53ced44cd447aa80583318120c7.jpg?impolicy=img_200"
}
}
],
"media_thumb": {
"url": "https://img.letgo.com/images/43/79/0d/1f/43790d1f3dc726808e0f8df022eb4351.jpg?impolicy=img_200",
"media_type": "image",
"width": 1024,
"height": 1024
},
"owner": {
"id": "23494fb4-3fca-4ad4-a4b3-fb1b5f591a6d",
"name": "Bear Allen",
"avatar_url": "https://avatars.letgo.com/images/2c/3b/b4/8c/2c3bb48c2a875b72387e8496d4f75c1bb185e968.jpg.jpeg",
"zip_code": "28803",
"country_code": "US",
"is_richy": false,
"city": "Asheville",
"banned": false,
"status": "active"
},
"geo": {
"lat": 35.57607,
"lng": -82.52582,
"country_code": "US",
"city": "Asheville",
"zip_code": "28803",
"distance": null
},
"status": 1,
"currency": "USD",
"price_flag": 2,
"price": 289,
"description": "Come check out this beautiful piece and all the rest of our inventory today!\n\nLocation in Store: TRS Inventory on Love St. \n\nThe Regeneration Station! WNC Best selection of unique furniture and items!\n\nPlease call to make sure this piece is still available before stopping in to see it.\n\nWe have 36,000 square feet of inventory to browse through if this piece isn't your style!\nThere's definitely something for everyone!\n\nOpen 7 days a week from 10-7!!\n\nThe Regeneration Station \n26A Glendale Ave\nAsheville, NC 28803\n(bright green building)\n\nantique old classic retro vintage modern new family furniture home house household room indoor outdoor deco decor decoration display store storage restore restored refurbish refurbished up-cycled recycled recycle salvage art artist artists artisan hand craft crafted crafters seat seats seating sit chair bench sofa couch sofas couches chairs settee recline reclining recliner rock rocking rocker bar barstool barstools stool stools ",
"language_code": "US",
"category_id": 4,
"name": "Six Drawer Dresser ",
"id": "614b5fdb-6dea-406e-891d-722cbbdbdd8d",
"created_at": "2019-06-21T13:54:54+00:00",
"updated_at": "2019-06-21T13:55:30+00:00",
"image_information": null,
"featured": false,
"rejected_reason": null,
"attributes": null,
"rejected": false,
"keyword_synonym_id": 11269,
"expires_on": null
}

在寻找一些API文档方面寻求帮助。或者,如果它是使用与其他应用程序相似的框架构建的,那么也许也可以有所帮助。谢谢!

0 个答案:

没有答案