Skip to content

Instantly share code, notes, and snippets.

View jamesshah's full-sized avatar

james shah jamesshah

View GitHub Profile
@jamesshah
jamesshah / quotes.py
Last active October 1, 2019 13:57
Random Quote Generator And Send Using Email | Python Web Scrapping Using BeautifulSoup
import requests, random
from bs4 import BeautifulSoup
import smtplib
#Function to generate a random quote.
def random_quote(url):
conn = requests.get(url)
soup = BeautifulSoup(conn.content,'html.parser')
quotes = soup.find_all('a', attrs={"title": "view quote"})
quotesList = []
@jamesshah
jamesshah / subtitles_downloader.py
Last active October 9, 2021 13:22
Python Script To Download Movie Subtitles | Webscrapping Using Python.
import webbrowser,requests,zipfile, io
from bs4 import BeautifulSoup
def subtitles_downloader():
try:
# Get Movie Name For Subtitles
movie_name = input("Enter Movie Name:")
#replacing spaces with hyphen to get valid link