Open AlJohri opened 10 years ago
This will prevent us from doing stupid hacks like
https://github.com/alpaca/socialscraper/blob/master/socialscraper/facebook/scraper.py#L24
class FacebookSession(requests.sessions.Session): def get(self, url, **kwargs): response = super(FacebookSession, self).get(url, **kwargs) if not auth.state(response.text, auth.LOCKED) and not auth.state(response.text, auth.SECURITY_CHECK): return response else: raise ScrapingError("Account locked. Stop scraping!")
I'm only checking if its locked or security check on each request but there's a ton of other states I should be checking for.
Best to move this into its own module.
This will prevent us from doing stupid hacks like
https://github.com/alpaca/socialscraper/blob/master/socialscraper/facebook/scraper.py#L24
I'm only checking if its locked or security check on each request but there's a ton of other states I should be checking for.
Best to move this into its own module.