Im scraping data from facebook a request every 4 seconds, and im getting proxies banned
im instagram im doing 2 request, one every second and other every 3 seconds, and no bans thaths 80 request per second, with 15 private proxys and in facebook just 15 per second with 15 proxies and getting banned..
If someone has any idea for scrape facebook witouth getting banned
im instagram im doing 2 request, one every second and other every 3 seconds, and no bans thaths 80 request per second, with 15 private proxys and in facebook just 15 per second with 15 proxies and getting banned..
If someone has any idea for scrape facebook witouth getting banned
Code:
from fake_headers import Headers
#https://pypi.org/project/fake-headers/
def Facebook():
codigo = None
while codigo is None:
time.sleep(4)
headers = Headers(headers=True).generate()
try:
proxies = {
'https': ez() #returns random proxy from list
}
global p
p = requests.get('https://www.facebook.com/public page/', verify=True,headers=headers)
words = re.findall('String(.{24})', p.text)
z = words[0]
x = re.split('\s+', z)
#dostuff and get stuff i need from p.text
except IndexError:
print("Something failed in facebook call, request cannot find Codigo/blocked" +str(datetime.datetime.now))
pass
except requests.exceptions.ConnectionError as e:
print("proxy failed, trying again")
print(e.args)
pass
except Exception as l:
print(l.args)
pass