-
Notifications
You must be signed in to change notification settings - Fork 791
Proxy Rotation #778
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
Open
hwamil
wants to merge
243
commits into
Hari-Nagarajan:alpha
Choose a base branch
from
hwamil:rotation_v2.1
base: alpha
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Proxy Rotation #778
Changes from 15 commits
Commits
Show all changes
243 commits
Select commit
Hold shift + click to select a range
620549c
new pull request because I suck
hwamil 7636050
moved assigning next item to the bottom of while loop since AmazonMon…
hwamil a0263dd
improved BadProxyCollector
hwamil 88d7aa5
made bad_proxies.json parameters more clear
hwamil 7a287b2
proxy collector now deletes an unbanned proxy if it has been good for…
hwamil e5326e5
Fixed a huge mistake in item assignment thanks to mbbush
hwamil acd430e
changed ItemsHandler assign_next_item method name to pop, although it…
hwamil 7e27c82
more methods for collector. gotta figure out how to save to file ONCE…
hwamil a68b3bf
added 'issaver' kwarg to AmazonMonitor. After all sessions are create…
hwamil 6d24ffc
BadProxyCollector is now never instantiated
hwamil 1e12313
BadProxyCollector delay for purging cooled down proxies from json cha…
hwamil a8060d7
new proxies.template_json
hwamil 6eda06e
fixed error in proxies template
hwamil 75da6cc
added return line in except block at BPC load so that it doesn't loop…
hwamil cdec75b
previous commit was a mistake. it is supposed to loop lmao
hwamil c25a4f3
if no proxies and sleeping sessions for a minute if 503 response
hwamil 25cbc73
implemented no proxy mode. uses single session using TCPConnector and…
hwamil 61569a9
changed 503 time.sleep to await asyncio.sleep
hwamil 92eed16
503 log change for no proxy mode
hwamil 3c2d936
Saving user agents to reuse when generating headers for new instances…
hwamil ee0f14e
feature to save user_agents for corresponding proxy urls so that sess…
hwamil a47a0d0
merged headers branch, adding user_agents save feature
hwamil 31148af
badproxycollector timer bug fix
hwamil a511e02
BPC fixed attribute error
hwamil b9f68b4
experimental feature stagger
hwamil 265248c
add init_sleep parameter using idx in monitor initialization and use …
hwamil 3183587
fixed unexpected kwarg
hwamil ce40261
stagger using len of item_list instead of n of proxies
hwamil 15beaea
realized that cycling len of item list defeats the purpose. using ran…
hwamil 92ef86e
random.choice may generate too many repeating numbers. going back to …
hwamil 1e86ef8
threw all previous methods away and just used proxies // len(item_lis…
hwamil f1ef100
added init_sleep attr to fail_recreate method
hwamil 253a6ec
abandoned previous method and placed staggering algo right into the I…
hwamil ba043d0
trying another method of staggering
hwamil cdf2b28
fixed unpack error caused by remnants of previous method
hwamil 7269253
fixed mistake of updating access time when returning true on itemshan…
hwamil 0ed906c
changed method name
hwamil 1368e33
changed next item flow by accident
hwamil 183ac89
fixed BPC bug
hwamil 3f458ca
fixed BPC bug 2
hwamil 40561fc
increased bad proxy wait from 1 min to 5 min
hwamil 04c1f35
Removed issaver flag from Monitoring and moved it into queue. Also re…
hwamil 13ba193
simplified BPC so that it only shows currently bad proxies with last …
hwamil 75e9345
blackd
hwamil 52b8817
Realized BPC being called could break program when user has no proxies
hwamil 2012bb8
cleaned up unused parameter checkout_task from AZNHandler and AZNMHan…
hwamil d91ec1d
simplified BPC further to just be a list so that it's more readable a…
hwamil e5a5901
increased sleep time from 0.1 to 0.5 for last_access_check for item s…
hwamil f055c30
pipenv install uvloop for fasteer asyncio
hwamil f3fbb4a
changed staggering back to 1s because... why not?
hwamil 0044216
cleaning bloat
hwamil 6b826a5
small things
hwamil dfb7b9f
moved IH item_ids declarance into create_items_pool block.
hwamil 9746abd
Update misc.py
hwamil 1648ec3
WIP
hwamil bae1305
uvloop now a click option as Windows is not supported
hwamil b31f1a0
migrated tools from misc to monitoring
hwamil 340f17e
fixed merge conflict
hwamil 9d695cb
tracking misc.py
hwamil 80f0a4f
fixed missing bad_proxies path var and changed item delay to be impli…
hwamil ad5395a
apparently you can't import asyncio.sleep
hwamil 06f62a1
changed it so that task_delay changes with the change in the number o…
hwamil 765018f
small fix for bpc
hwamil 0ba6320
renamed bpcs
hwamil 7377d5f
log for task_delay
hwamil a10bdc8
fixed error in f string
hwamil 5cbb9de
bit more info in bpc log
hwamil b4c5c08
changed method name for json_url
hwamil 323fc50
merge conflict resolved
hwamil 2436bd8
delay / (good_proxies/asins) if len(good_proxies) > len(asins)
hwamil d092bb5
trying different flow
hwamil c7e4f31
time.sleep severely impacts performance. Shouldn't be a surprise :/
hwamil fb4fd61
took out first item condition
hwamil c707989
small changes to check_last_access
hwamil db8ed35
commit before merging rotation
hwamil e5a67b6
conflict resolved
hwamil b40eb98
use same headers when recreating. fake_user_agent causing too many op…
hwamil d102ad5
reduced proxies.json layer
hwamil 94c1cb8
proxies.template_json
hwamil 5c2171f
queue.put to put_nowait so that it doesn't get blocked
hwamil 96aee13
had to await last_access_check for it to work properly
hwamil 01f19e6
changed item stagger to a task stagger implementation where it checks…
hwamil d8a4442
changed rest_time format from rounding to two decimal places to no ro…
hwamil ebadea7
changed formatting one more time to milliseconds with rounding
hwamil 9eb3dca
set last_task before sleeping
hwamil d9c1569
working build
hwamil f7f49bd
tested and working with multiple groups of proxies
hwamil ac7c311
time.sleep to async.sleep. realized even if it's a very small amount …
hwamil 3df8685
got rid of bpc.save since you can find it in log and it slows down mo…
hwamil 8a9fedb
reducing bpc even further. may just get rid of it altogether. seems u…
hwamil fda822d
preload proxy group to get rid of ramp up
hwamil 485af97
Revert "preload proxy group to get rid of ramp up"
hwamil 891ed0b
failed to preload proxies and reverted. little hacky but it'll do for…
hwamil 1bfbcf4
switched to time.sleep again. see what happens
hwamil 494c812
just going back to asyncio.sleep cuz I don't know any better
hwamil 9319305
threw out dynamic staggering and just implemented initial staggering …
hwamil a3485d2
change non-active groups sleep to delay so it doesn't hang the progra…
hwamil 16cf946
got rid of unnecessary redundancies
hwamil 021a0b3
.
hwamil 5a6d7dd
..
hwamil 7f0c314
fixed broken timer
hwamil bf1704b
I'm too tired to know what I did
hwamil 2898e71
Merge branch 'rotation_v2.1' into atc_json
hwamil a6bf8fb
merged rotation
hwamil 4c2d7a9
moved uvloop to dev packages so normal users on windows don't have to…
hwamil 0fe6968
almost implemented
hwamil f1df53f
clunky but working
hwamil f7e19b7
Merge branch 'atc_json' into rotation_v2.1
hwamil 16d8177
tiny touch up
hwamil ef611b5
timers in the blocks so we're not hitting super fast
hwamil 779438d
.
hwamil 537733a
conflict resolved
hwamil 1004703
checks and balances
hwamil 709769a
neatify logs
hwamil b4c7b17
placed another check so that if json request gets 503'd it moves onto…
hwamil bed40d6
blackd
hwamil 98c8b51
omg this is clunky as hell
hwamil d1e33c3
TypeError bandaid in validate_session
hwamil d9e93b9
big bandaid for nonetype error
hwamil 9db43be
tree is not None
hwamil 0e38e37
proxy next to dict to see confirm change
hwamil 0957b32
lol coffeebeans freaked me out
hwamil 1b5fb14
changed test product to a card so sessions start empty lmao
hwamil fe22a2e
stopping validation every time the loop starts
hwamil dc91dd8
queue.put before save_html, duh
hwamil 78abf2a
Update amazon_monitoring.py
hwamil e470643
clearing json_dict before get to confirm we are getting valid json pa…
hwamil 16c9a4a
fixed turbo_ini params. confirms it initiates correctly. received emp…
hwamil 6696154
more logssss cuz we don't have enoughhhh
hwamil f9c9eee
remember me checkbox fix taken from calebchongc
hwamil 2c8002e
fixed confusing debug log that made it appear that it runs ajax on ev…
hwamil ef4e7e6
just making logs look pretty.
hwamil fbc3809
turbo_checkout missing domain param added
hwamil e1e143c
domain -> self.amazon_domain
hwamil 4dbbeeb
bring me more logs!
hwamil 7090f5d
isOK check added
hwamil 52585c0
isOK check added2
hwamil fda3247
unsplitted turbo init branching for json and ajax methods
hwamil 7f776ac
little clean up
hwamil 5134846
using context manager (async with session.get(url) as r) to validate …
hwamil 40dd1ad
more cleaning
hwamil 5f4897f
get revalidated if CSRF Error
hwamil 30e0543
continue after failing validation
hwamil ff565b4
ItemsHandler now adds back items that's been removed after turboing i…
hwamil 1dbc92e
offerid.template_json
hwamil 4c33718
ItemHandler timer increased from 10 min to 60 min
hwamil 538faea
asyncio InvalidStateError bandaid exception catching and timer reset …
hwamil efc91ba
clear out removed items list on ItemsHandler.refresh
hwamil a6521ef
I'm stupid
hwamil a547e79
one less line for the same result. bliss
hwamil bb0c46a
Figured out that ValueError: not in list was happening because multip…
hwamil f59e886
Merge branch 'alpha' of github.com:Hari-Nagarajan/fairgame into rotat…
hwamil aa0beda
cleaned off bpc
hwamil a795d85
ValueError exception handling modified
hwamil d8d206b
moved queue.put() and save_html into try block instead of outside of …
hwamil fd66e60
forgot the f in f-string
hwamil 933d240
log for checking whether turbo init is getting SellerDetail or offerid
hwamil 1d121a4
trying to catch StopIteration
hwamil 11aa281
exception StopIteration catching at next_item method
hwamil 1000e05
stop logging ValueError
hwamil 2693d7f
random delay
hwamil ce94705
asyncio.TimeoutError exception catching
hwamil d747451
log for timeouterror
hwamil c18d5ad
lmao infinite delay by mistake. fixed
hwamil 30b9bee
some sleeping cushions in validation process
hwamil 0ec1fed
changed randint range to 0,4
hwamil 58dc858
all exception catching try/except block at cli.py just as a hotfix
hwamil 89045ab
some changes that I can't remember
hwamil b392ea4
fail_recreate seems to cause the crashes (for unknown reasons to me s…
hwamil 7d858f2
I can't count
hwamil fa0298e
getting rid of staggering since now there is random delay
hwamil 9db4e1c
Reset fail_counter after cooldown
hwamil d3a4275
Now using fake_headers module to generate random headers for sessions
hwamil f71bd22
dependencies for fake_headers
hwamil bcf1149
max fail from 10 to 5
hwamil 8781e49
current_group_proxies dust cleaned
hwamil 84c1d34
changed loglevel for ajax so we can see non-offerid items in aioconfig
hwamil ca09532
you know i love logs
hwamil cd0861f
Trying to catch the reason for 'can't extract image from plain/text' …
hwamil fe13f56
amazoncaptcha.exceptions.ContentTypeError was the culprit. Why now? W…
hwamil 1895e6e
catching typeerror
hwamil df3c81d
Linux specific Errno 32, for python it becomes IOError. Putting entir…
hwamil 039099b
merged hari/alpha with TheTabKey's commit
hwamil f5bf60e
proccesspoolexecutor added instead of trying to priorityqueue
hwamil ece3a80
merged hari/alpha: --use-proxies flag
hwamil ee5ea35
more resolving with main alpha branch and adding offerid flag
hwamil 8627fec
turned on debug logs
hwamil dbb72cb
merged processpoolexecutor method
hwamil 0665916
blackd
hwamil 5069651
trying multiprocessing on captcha solving as well
hwamil 04b943e
increased proxy cooldown time from 1 hr to 6 hrs to lessen chance of …
hwamil e09878e
took captcha solving off of multiprocessing.
hwamil d6ca7ed
added back init stagger to potentially alleviate IO congestion... pre…
hwamil 8812eca
changed so that asyncio.gather(monitors) executes first without being…
hwamil 487b1d3
went back to the old way of submitting to process pool as it made mor…
hwamil 4f4e527
misc
hwamil b477cae
misc2
hwamil 1718264
misc3
hwamil f007999
trying out asyncio's own run_in_executor for parallel computing. capt…
hwamil 45a8b85
deleted concurrent.futures import line. one thing to note is that run…
hwamil 56408ef
limit captcha solving workers to 2 so that other two can run checkout…
hwamil b53241c
just putting run_in_executor on everything I can since I'm getting 40…
hwamil ed4e1ea
take get_qualified_seller off executor
hwamil 1cf50e0
made small change to source code for amazoncaptcha so copied the libr…
hwamil f7796a4
placed sleep in while loop in validate_session
hwamil 3235aa9
using fake-headers since mobile headers ain't doing shit
hwamil 080bc92
experimenting with captcha solves and whether it can get past bot det…
hwamil f2030b9
instead of sleeping an hour and resuming now 10 fails will make a pro…
hwamil 9996c8b
updating log statements
hwamil ec03aee
dem logs
hwamil 45f0a7e
checks status along with tree so we don't unnecessarily call get_sellers
hwamil 8682896
dem logss
hwamil 58f852b
less noise in the logs
hwamil 363bd6e
randomize sleep times so program not bombarded all at once when coold…
hwamil e3d6019
50 tries seem okay but with a lot of proxies getting captchas it real…
hwamil ce0dbf2
add to bad proxies list when failing validation
hwamil 3caa800
changed fail sleep time between 5-10 minutes instead of 30-60 minutes
hwamil 7786572
added captchaaio
hwamil 04d342e
undoing multiprocessing on checkout_worker since some users complaine…
hwamil a0a39ba
await gather
hwamil c378ade
modify logs
hwamil 226c0cf
got rid of cooldown for 503 since json method gets 200 while ajax get…
hwamil 05b6943
remove proxy from badproxies list if it becomes validated
hwamil b14e86f
clean up
hwamil 151d7c1
trying another way to run checkout_worker in parallel
hwamil b111eef
apparently if you don't set process executor for run_in_executor it d…
hwamil a304f68
captcha max_workers to half cpu_count
hwamil 96d442d
captcha max try back to 25
hwamil 956006e
infinite (1000) captcha tries
hwamil 0900119
changes I can't remember.
hwamil d2a7566
Merge branch 'alpha' of github.com:Hari-Nagarajan/fairgame into rotat…
hwamil 574ef28
merged alpha
hwamil ea3975f
no hard-coded domain
hwamil 0a17616
Merge branch 'alpha' of github.com:Hari-Nagarajan/fairgame into rotat…
hwamil 12e1419
fix lack of scheme -Dakk
hwamil 6ebd2d5
merged alpha
hwamil 526d462
I'm getting way too many captchas. gotta filter out the good ones
hwamil 8b5f765
tiny fix for good_proxies.json len
hwamil 1c0343e
more proxies list changes
hwamil 0a7143b
.
hwamil ead4438
pass monitoring session into captcha solver so that it doesn't use ho…
hwamil 26d6127
log and html save changes
hwamil 4434e3b
.
hwamil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
{ | ||
"proxies": [ | ||
{ | ||
"http": "http://user:password@ipaddress:port", | ||
"https": "http://user:password@ipaddress:port" | ||
}, | ||
{ | ||
"http": "http://user:password@ipaddress:port", | ||
"https": "http://user:password@ipaddress:port" | ||
} | ||
"socks5://username:password@ip:port", | ||
"socks5://ip:port" | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.