Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lookup): use random user agents #1335

Merged
merged 3 commits into from
Dec 11, 2020
Merged

feat(lookup): use random user agents #1335

merged 3 commits into from
Dec 11, 2020

Conversation

jef
Copy link
Owner

@jef jef commented Dec 11, 2020

Description

  • Uses random user agent now with Chrome greater than version 20.
  • Removes usage of custom user agent.
    • Most users either configured incorrectly or never provided enough.

Testing

Ran for an hour or so, minimized captchas, by a lot.

New dependencies

random-useragent

@jef jef changed the title feat!: initial release of new config feat(lookup): use random user agents Dec 11, 2020
@jef jef merged commit b599c23 into main Dec 11, 2020
@jef jef deleted the feat/random-ua branch December 11, 2020 05:33
@joerg-knitter
Copy link

Sometimes, the random user agent apparently causes the browser to be detected as mobile browser and then the mobile version of the shopping site is being opened. Seen in non-headless mode on amazon-de. If a different CSS is being used then, the tags might not be found in my opinion.

ven0ms99 pushed a commit to ven0ms99/streetmerchant that referenced this pull request Dec 11, 2020
@omar19841986
Copy link

hi im copy your project but,
src/index.ts:51:17 - error TS2339: Property 'userAgent' does not exist on type '{ isHeadless: boolean; isIncognito: boolean; isTrusted: boolean; lowBandwidth: boolean; maxBackoff: number; maxSleep: number; minBackoff: number; minSleep: number; open: boolean; }'.

51 config.browser.userAgent = await browser.userAgent();
~~~~~~~~~

src/notification/discord.ts:53:7 - error TS7053: Element implicitly has an 'any' type because expression of type 'Series' can't be used to index type '{ '3060ti': string[]; 3070: string[]; 3080: string[]; 3090: string[]; rx6800: string[]; rx6800xt: string[]; rx6900xt: string[]; ryzen5600: string[]; ryzen5800: string[]; ryzen5900: string[]; ryzen5950: string[]; sf: string[]; ... 4 more ...; xboxsx: string[]; }'.
Property 'darkhero' does not exist on type '{ '3060ti': string[]; 3070: string[]; 3080: string[]; 3090: string[]; rx6800: string[]; rx6800xt: string[]; rx6900xt: string[]; ryzen5600: string[]; ryzen5800: string[]; ryzen5900: string[]; ryzen5950: string[]; sf: string[]; ... 4 more ...; xboxsx: string[]; }'.

53 notifyGroupSeries[link.series]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/store/lookup.ts:332:20 - error TS7053: Element implicitly has an 'any' type because expression of type 'Series' can't be used to index type '{ '3060ti': number; 3070: number; 3080: number; 3090: number; rx6800: number; rx6800xt: number; rx6900xt: number; ryzen5600: number; ryzen5800: number; ryzen5900: number; ryzen5950: number; sf: number; ... 4 more ...; xboxsx: number; }'.
Property 'darkhero' does not exist on type '{ '3060ti': number; 3070: number; 3080: number; 3090: number; rx6800: number; rx6800xt: number; rx6900xt: number; ryzen5600: number; ryzen5800: number; ryzen5900: number; ryzen5950: number; sf: number; ... 4 more ...; xboxsx: number; }'.

332 const maxPrice = config.store.maxPrice.series[link.series];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 3 errors.

npm ERR! code 2
npm ERR! path C:\Users\omars\Documents\streetmerchant
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c tsc

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\omars\AppData\Local\npm-cache_logs\2020-12-11T17_00_53_397Z-debug.log
npm ERR! code 2
npm ERR! path C:\Users\omars\Documents\streetmerchant
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c npm run build && node build/index.js

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\omars\AppData\Local\npm-cache_logs\2020-12-11T17_00_53_421Z-debug.log
help me please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants