Closed hchen98 closed 3 years ago
@hchen98 There are ways indeed. But all the ones I tried highered detection rates dramatically, so I recommend you not trying to switch UA in first place. Also the repo you mentioned is dogshit, it constantly has outtages, because the used host is down.
You're free to use my code for a list of web Useragents:
import re,requests,random
ua_list = []
userlist=re.sub('\r\n', '\n', str(requests.get('http://pastebin.com/raw/VtUHCwE6').text)).splitlines()
for x in userlist:ua_list.append(x)
random.shuffle(ua_list)
def get_useragent():return(str(random.choice(ua_list)))
pers_UA=get_useragent()
@hchen98 There are ways indeed. But all the ones I tried highered detection rates dramatically, so I recommend you not trying to switch UA in first place. Also the repo you mentioned is dogshit, it constantly has outtages, because the used host is down.
You're free to use my code for a list of web Useragents:
import re,requests,random ua_list = [] userlist=re.sub('\r\n', '\n', str(requests.get('http://pastebin.com/raw/VtUHCwE6').text)).splitlines() for x in userlist:ua_list.append(x) random.shuffle(ua_list) def get_useragent():return(str(random.choice(ua_list))) pers_UA=get_useragent()
@Avnsx Hey, thanks for replying. Now I see it. Also with this repo, it does not synchronize the latest web driver.
Once I use
from fake_useragent import UserAgent
, the site detects that I am using an automation tool (aka selenium) and redirects me to captcha check. Is there a way for me to add a fake user agent in this lib?