marvinody / mercari

a wrapper around mercari jp shopping site
43 stars 15 forks source link

Add sold-out entry to item #6

Closed Guriido closed 2 years ago

Guriido commented 3 years ago

Implemented a test to check for the sold-out badge in the parser, and added an option to search for sold-out items. By default, the behavior of search is identical to the original implementation (i.e., skip sold items)

Guriido commented 3 years ago

There is not much activity recently, but it would be nice if you could take a look @marvinody!

marvinody commented 2 years ago

I'm so sorry @Guriido . Github really screwed me over here with notifications (or lack of).

I appreciate the MR you put together and have no issues with it.

However, Mercari recently changed their site to a SPA and added an underlying API service. Past week, I've been looking at how they generate access tokens to just use their service under the hood and have a working PoC in JavaScript. But my lack of cryptography is showing in Python and I wasn't able to replicate my logic here. So I can't get it working with the new API.

I've added a file containing my current work & a small update to the readme to tell anyone who stumbles onto this.

The main issue is that I can't figure out how to get the signature generated by crypto method to actually be valid for a JWT. It seems to be double encoded DER -> ASN.1 of a Dss-Sig-Value sequence. So that's all over my head for this small hobby project.

marvinody commented 2 years ago

Sorry, I may have jumped the gun earlier. After sending that, I sat down and kept at it. Found out how to get python to generate the access token. I'll be updating this lib soon with the new style. It will require a newer python version and updated dependencies, but I hope to have it working by the weekend.

Guriido commented 2 years ago

Sorry for the late reaction... Thank you for your message, I saw that the changes you made in order to adapt to the new API include the sold-out entry in the request, so this is resolved. Thank you for the update!