Releases: KirianCaumes/Discogs-Marketplace-API-NodeJS
v1.10.0
- ⬆️ Upgrade dependencies 53b4dab
- ♻️ Remove strategies, only Playwright remains a564c56
- ⬆️ Upgrade dependencies 8ac0dd7
- 🎨 Remove some devDependencies no longer useful b994558
- ⬆️ Add ts-node for dev only c53e7c0
ℹ️ Removed system with strategies (fetch
or browser
). As browser
was the most consistent, I decided to keep only this one.
Discussion is open in issues.
v1.9.3
v1.9.2
- ⬆️ Upgrade dependencies 4bb21b9
v1.9.1
v1.9.0
- 🎨 Initialize strategy system d7c70be
v1.8.1
- ⚡️ Improve performance b24f3ab
Performance with Playwright were slightly improved.
ℹ️ It seems that (at the time of writing this) Cloudflare protection has been disabled by Discogs. So using version 1.8.0 or 1.8.1 with Playwright may not be mandatory, as 1.7.4 (or earlier) with Axios should still work.
I'll wait a few days/weeks to find out if I go back to Axios or keep it that way with Playwright.
Discussion is open in issues.
🆙 Update:
I ran some benchmarks with a basic script to see the differences between 1.7.3, 1.8.0 and 1.8.1:
import { DiscogsMarketplace } from 'discogs-marketplace-api-nodejs'
import { appendFile } from 'fs/promises'
let i = 0
while (i < 100) {
const startTime = performance.now()
const res = await DiscogsMarketplace.search({searchType: 'artist_id', searchValue: '244819', limit: 250})
const seconds = (performance.now() - startTime) / 1000
appendFile('./data.csv', seconds + '\n')
await new Promise(resolve => setTimeout(resolve, 10000))
i++
}
Here is the final result (in seconds):
v1.7.3 | v1.8.0 | v1.8.1 | |
---|---|---|---|
Average | 2.998674758 | 3.77877408 | 3.354036791 |
Median | 2.849554443 | 3.733265151 | 3.340016132 |
Differences compare to v1.7.3:
v1.7.3 | v1.8.0 | v1.8.1 | |
---|---|---|---|
Average | 2.998674758 | +0.780099322 | +0.355362033 |
Median | 2.849554443 | +0.883710708 | +0.490461689 |
👉 1.7.3 (with Axios) is still the fastest solution.
👉 1.8.1 (with Playwright) is a decent alternative, and the best option if Discogs activate again some kind of protection (like Cloudflare).
If you have some idea to speed up the process with Playwright (and maybe be more futur proof), do not hesitate to open an issue and discuss your ideas.
Data generated:
v1.7.3 | v1.8.0 | v1.8.1 |
---|---|---|
3.4812927239984273 | 5.6916200109981 | 3.225098900001496 |
2.709650297999382 | 4.120661055997014 | 3.523792089998722 |
2.7584481500014664 | 3.771462501998991 | 3.3696138099990787 |
4.038943298000842 | 4.411718871999532 | 3.7382336490005255 |
3.530769510000944 | 3.7089813900031148 | 3.479868383001536 |
2.7505904840007425 | 3.5032090720012783 | 3.7497803220003845 |
4.069388769000769 | 3.792873016998172 | 3.325610282998532 |
2.8427535699978472 | 3.7648759259991347 | 3.2885755609981717 |
3.354182469997555 | 3.46152372200042 | 3.456441303998232 |
3.0532717039994894 | 3.339883382000029 | 3.161021518997848 |
3.057582538001239 | 3.3451920370012522 | 2.885544902998954 |
3.180912217002362 | 3.9835160659998654 | 3.3511483669988813 |
3.118522284001112 | 3.804108541999012 | 3.87905054499954 |
3.30313273299858 | 4.167209044001996 | 3.530373544000089 |
3.2154072390012445 | 3.9545751109980047 | 3.6265599270015954 |
3.328992971997708 | 4.547406274002046 | 3.512816183000803 |
3.3704127390012144 | 4.0138765960000455 | 3.4252277290001514 |
3.1507955740019677 | 3.801525352999568 | 3.1389046880006792 |
2.9622337290011345 | 3.6960759599991144 | 3.8264930500015617 |
2.6055603800006213 | 3.886462487000972 | 3.364075551003218 |
2.7614901750013234 | 3.380520461000502 | 3.5089565310031174 |
2.9841890110000966 | 4.041614452999085 | 2.7217736910022796 |
2.864909970998764 | 3.9215685099996627 | 3.091719310000539 |
2.793044719003141 | 3.225399957999587 | 4.06839318600297 |
2.522493480000645 | 3.811479267001152 | 2.9692435229979455 |
2.519069903999567 | 3.6837204840034246 | 4.106811195001006 |
3.5219443150013685 | 3.5970254120007157 | 3.3692142959982156 |
2.4872532170005144 | 3.657440870001912 | 3.0762986809983848 |
3.012186293002218 | 3.702213665999472 | 3.6853346779979765 |
2.591945835001767 | 3.9549759139977394 | 2.834002015002072 |
2.614460788000375 | 3.7724716259986164 | 3.3631202259995043 |
2.463982418000698 | 3.3055982419997454 | 3.1998370460011065 |
2.6067080469988286 | 3.7736519210003316 | 4.248860020000487 |
2.650746546000242 | 3.114587269000709 | 2.91267216899991 |
2.4103913909979164 | 3.668757773000747 | 3.4262618539966643 |
3.4993304940015078 | 3.975948731999844 | 3.581815569002181 |
2.4623495939970015 | 3.760365598998964 | 3.2356958009973167 |
2.6533582759983836 | 3.3826514110006394 | 3.1546201529987155 |
2.552503685001284 | 3.593421539001167 | 3.550042417999357 |
2.32822752700001 | 3.7360077349990606 | 3.2976858380027116 |
2.739417568001896 | 3.863820597998798 | 3.2884985550008716 |
2.782547607999295 | 3.313242568999529 | 2.923102657999843 |
2.779837446000427 | 4.841543182998896 | 3.1136439340002835 |
2.582436278998852 | 3.4234597200006247 | 3.6787839729972185 |
3.373063627999276 | 3.2009319740012288 | 3.1509460970014334 |
2.6406832790002226 | 3.652621313996613 | 3.275229467000812 |
2.6561021520011128 | 4.173912494998425 | 3.444898166999221 |
2.6304031600020825 | 4.0612901070006195 | 2.927308680001646 |
3.0096258639991285 | 3.5020054549984634 | 3.8781524769999085 |
3.4016310089975597 | 3.824701677002013 | 3.2183028880022464 |
3.687672600001097 | 3.985850026000291 | 3.7076855389997365 |
3.1827002809979024 | 3.6909845870025455 | 3.5416496829986572 |
2.9215918829999863 | 3.6537763250023128 | 2.8622224269993604 |
3.992159925997257 | 3.4549484449997543 | 3.2312297200001776 |
2.975640530001372 | 3.768480624001473 | 3.605548477999866 |
2.589147824000567 | 4.724738269999623 | 3.226517129998654 |
2.524816876001656 | 3.1786821779981254 | 3.5554225730001927 |
2.7744907420016824 | 3.341612580999732 | 3.1556234640032055 |
3.25084742699936 | 3.2921085160002113 | 3.0668799570016563 |
3.3006639029979707 | 3.477916834998876 | 2.732096386000514 |
2.527254933997989 | 3.7274876809976996 | 3.296633345000446 |
3.4674745309986172 | 3.605112715996802 | 3.5114839570000766 |
2.6053167699985207 | 4.491482732001692 | 3.039211325999349 |
2.9514914189986885 | 3.5482868140004573 | 4.170804663997144 |
2.3832161510027947 | 5.064047663997859 | 3.031662328001112 |
2.896631480999291 | 3.493736969999969 | 2.8383912519998846 |
3.2135983520001172 | 3.5155313940010964 | 4.090029895998538 |
2.7882015540003775 | 3.4368734439983966 | 3.2795194079987704 |
3.814263475000858 | 3.5636312859989703 | 2.8940933169983327 |
2.532116794999689 | 3.9665103869996967 | 3.5518511100001633 |
3.04138052899763 | 4.2768803910017015 | 3.617893679998815 |
2.7174101289995014 | 3.928894333999604 | 3.2884647889994083 |
3.2681589029990135 | 3.83589262400195 | 3.1673983349986377 |
2.626834684997797 | 3.590180865999311 | 3.1785470330007373 |
2.2383101150020956 | 3.729726410001516 | 3.3554696549996734 |
4.595663072001189 | 3.4378696140013636 | 3.5209583190008997 |
2.565917948000133 | 3.8915459620021284 | 3.469563154000789 |
2.5414026600010695 | 3.7511270879991354 | 3.1381920039989053 |
3.0011992750018837 | 4.050263950999827 | 3.849253368001431 |
3.027702703997493 | 4.030068316999823 | 3.4319868800006805 |
2.7994839260019364 | 3.8765535330027343 | 3.5367221969999374 |
4.89145227399841 | 3.5894340160004794 | 3.7925712309964 |
2.856355315003544 | 4.198792204998433 | 3.0178684539981186 |
2.5551867440007627 | 3.9379502269998192 | 3.328883896999061 |
2.622245184998959 | 4.182341744001954 | 3.070725852001458 |
3.367205243997276 | 3.608010345000774 | 3.009019294001162 |
2.769762497998774 | 3.73052256700024 | 3.3800727270022035 |
2.782508721999824 | 3.5192035109996795 | 3.405336589999497 |
2.7189831520020964 | 3.7404464179985224 | 3.321118817999959 |
2.792278464000672 | 3.5744181220009925 | 3.5451729739978908 |
3.3827745309993626 | 3.7185929870009424 | 3.5050013110004365 |
3.6857933930009605 | 3.8821553120017054 | 3.585852724999189 |
2.450227756999433 | 3.5039744730032982 | 3.3968142729997637 |
2.9051245060004294 | 3.381566998001188 | 2.7887242220006883 |
2.664160035002977 | 3.77405547599867 | 2.9293750890009105 |
2.760850491002202 | 4.266121640000493 | 3.1979930509999392 |
4.043929896000773 | 3.356278138000518 | 3.327827978000045 |
3.4566270020008085 | 3.476193489998579 | 3.639053285997361 |
4.4628918219991025 | 3.616809752997011 | 2.983291319001466 |
3.117180262003094 | 3.7560316530019047 | 3.0765152349993587 |
v1.8.0
- 🚑️ Switch to Playwright 017c24b
🚨 Discogs seems to be blocking HTTP requests made outside a navigator (like Postman or Axios). I had to switch (again) to Playwright to avoid Cloudflare detection and captcha. Do not hesistate to provide some feedback if you have a better (faster) solution or idea.
v1.7.3
v1.7.2
- ⚡️ Convert types to interfaces d1a0b91 (see why here: https://github.com/microsoft/TypeScript/wiki/Performance#preferring-interfaces-over-intersections)
InputType
is nowInputInterface
OutputSuccessType
is nowOutputSuccessInterface
OutputErrorType
is nowOutputErrorInterface