Skip to content

Python script, which empowers people with no programming background to generate robust leads on a mass scale. This repo will be compiled of various versatile techniques used in lead generation.

basic handlers created

Madi3c116989170d
diff --git a/app/views.py b/app/views.py
new file mode 100644
index 0000000..6c6f515
--- /dev/null
+++ b/app/views.py
@@ -0,0 +1,32 @@
+from flask import render_template, redirect, url_for, request
+from app import app
+
+bad_user_agents = [
+ 'request',
+ 'robot',
+ 'spider',
+ 'scrapy',
+ 'crawl',
+ 'parser'
+]
+
+def check_user_agent():
+ user_agent = request.headers.get('User-Agent')
+
+ if not user_agent:
+ return '<h1>Hi Bot! Check your cookies</h1><h2>If you are seeing this and you are a human, enable JavaScript and refresh your cookeis :D</h2>'
+
+ for bad_user_agent in bad_user_agents:
+ if bad_user_agent in user_agent.lower():
+ return '<h1>Hi Bot! Check your cookies</h1><h2>If you are seeing this and you are a human, enable JavaScript and refresh your cookeis :D</h2>'
+
+
+def main():
+ return render_template('index.html')
+
+
+def error(e):
+ return render_template('errors/not_found.html', error=e), 404
\ No newline at end of file