Category: Python-projects

How to Build a Simple Auto-Login Bot with Python

In this article, we are going to see how to built a simple auto-login bot using python.In this present scenario, every website uses authentication and we have to log in by entering proper credentials. But sometimes it becomes very hectic to login again and again to a particular website. So, to come out of this […]

Continue Reading

Covid Vaccine Availability using Flask Server

from flask import Flask,request,session,render_templateimport requests,timefrom datetime import datetime,timedelta  app = Flask(__name__)  @app.route(‘/’)def home():    return render_template(“index.html”)  @app.route(‘/CheckSlot’)def check():            pin = request.args.get(“pincode”)              age = request.args.get(“age”)    data = list()              result = findSlot(age,pin,data)          if(result == 0):        return render_template(“noavailable.html”)     return render_template(“slot.html”,data = data)  def findSlot(age,pin,data):    flag = ‘y’    num_days =  2    actual = datetime.today()    list_format = [actual + timedelta(days=i) for i in range(num_days)]    actual_dates = [i.strftime(“%d-%m-%Y”) for i in list_format]              while True:        counter = 0        for given_date in actual_dates:                                    header = […]

Continue Reading

Twitter Sentiment Analysis WebApp Using Flask

from flask import Blueprint, render_template, requestimport matplotlib.pyplot as pltimport os  import tweepyimport csvimport refrom textblob import TextBlobimport matplotlibmatplotlib.use(‘agg’)  second = Blueprint(“second”, __name__, static_folder=”static”,                   template_folder=”template”)  @second.route(“/sentiment_analyzer”)def sentiment_analyzer():    return render_template(“sentiment_analyzer.html”)    class SentimentAnalysis:      def __init__(self):        self.tweets = []        self.tweetText = []          def DownloadData(self, keyword, tweets):                  consumerKey = ‘//get from Tweepy’        consumerSecret = ‘//get from Tweepy’        accessToken = ‘//insert your access token here’        accessTokenSecret = ‘//Tweepy AccessToken secret here’        auth = tweepy.OAuthHandler(consumerKey, consumerSecret)        auth.set_access_token(accessToken, accessTokenSecret)        api […]

Continue Reading