Skip to content

yasinilkalp/TrendyolStoreInfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎭 Trendyol Seller Information With Playwright

This project was designed as a side project because Trendyol seller information could not be obtained via API. We developed it using the C# language and the playwright library. Our aim is to learn and have fun while developing the project. We hope you have fun contributing to it as well.

We also published the project as a Nuget package. You can start using it by installing the package from your Nuget package manager. @Metehan Bas has prepared an Npm package in case it is useful for someone. We will update this when we publish the package. Please check back occasionally.

Looking for Playwright for .NET

🎈 Installation

To set up, we first add our Nuget package to our project.

dotnet add package Ledbim.TrendyolStoreInfo 

To use the package, we inject our service into Startup.cs as follows.

services.AddTrendyolStoreService();

Once you have injected the service, you can use it in a structure such as a controller like this. We call the method that gets the Seller information based on the Seller Id parameter.

[ApiController]
[Route("api/[controller]")]
public class TrendyolStoreController : BaseController
{

    private readonly ITrendyolStoreService _service;
    public TrendyolStoreController(ITrendyolStoreService service)
    {
        _service = service;
    }

    [HttpGet]
    public async Task<IActionResult> Get([FromQuery] string SellerId)
    { 
        var response = await _service.GetStore(SellerId);
        return Ok(response);
    }
}

Let's Examine a Sample Trendyol Store

You can see a screenshot of an example store information from Trendyol. Please review the json output we obtained by using the package

image

{
  "SellerId": "132292",
  "StoreName": "FTMODA",
  "StoreImage": "https://cdn.dsmcdn.com/seller-store/uploads/132292/6c86d410-6b36-4ae1-9d78-39c341e1a4ea.jpeg",
  "Score": "9.4",
  "RegisterTime": "2 Yıl",
  "Location": "İzmir",
  "ProductCount": "200+",
  "DeliveryTimeToCargo": "1 Gün",
  "QuestionAnswerRate": "%33",
  "StoreUrl": "https://www.trendyol.com/magaza/x-m-132292"
}

✍️ Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages