From 425dd4872cbe324d93a750c8eccde6723fdc2ddb Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Mon, 14 Sep 2020 14:22:20 +0530 Subject: [PATCH 01/21] Implementing open movie database API --- .DS_Store | Bin 0 -> 8196 bytes projects/.DS_Store | Bin 0 -> 14340 bytes .../Find_imdb_rating/.vscode/settings.json | 3 + projects/Find_imdb_rating/find_IMDb_rating.py | 57 ++++++++++-------- 4 files changed, 36 insertions(+), 24 deletions(-) create mode 100644 .DS_Store create mode 100644 projects/.DS_Store create mode 100644 projects/Find_imdb_rating/.vscode/settings.json diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c38e1694b78114c02a310d5523b5209f140becb5 GIT binary patch literal 8196 zcmeHM&2AG(5UvVgGY+ts{E>iIX@rG@M1+zh+8hwVabm#YC*IhEgut2^Psa?5r_Ibb zAqhd|zyomGMdATC@c=7vW}jeBh(`d4)1G##yT>81gE)bZw%h9dYP##Ip8o9aaoGTX z*@im-FbV($Re|OKYW65%T-1)zmGlT65+9%pb8vy$8A4sO0$KsBfL1^&pcVKY6`*If zD8^@=`)X9TS^=%V|55>QK3G%*W)f^Flt%|OG6f*)rfyltraVA$tOPR&HWf-L#Z=h? zCR9vP3{-R)w}d-kCc&mcMF&)Lz+`4jG8B}v6VH?qsJw85dV;E3}kUZ}Zr$WrO`@xT2@^{vvda};HoVxEt@%Z@P z*tM^F{|`Ne(QEV`>b+gO%h!sr9XFz^9WINjf*s#=61&8?zir#jg2&d%=FkieV%rN? zD9N77$mP}zFL3!$E?XSzie%# zjFA%)=kj-I>l>SowjTdMi=u+b*$92=db@p2R);WNWi?qSzHTk_ooTj~n(94p@X(Ka zX8*uo|4{$%;o*_d;Uh@d^oqUEqb;xiRL&gFbZ*FBJV)0_x?29TP_x%Eoyx8Nx(vH!kTM@~h zk6A4rtZbS15Uv-T!jVt7;nHccmc2A zPj~}w;XV9=J$M9<<0+iP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3-niUujcRlAC)4h*-tM;g zBHV7aaLWf*+TCV4T242*&4J*o=m(X`bY;3Wcj(TY7hgDWw0iv5iMvOucTSvGJX(G6 z_)B;1PFD^-b?nu%*VZ>bx%27W&%Q?a#v@7eh_9LK;~Tss@qbC&t(AValXh?5UgA`P z`*kT@la`DQ!~~>U5I#+^u+Yhx_@i@S8#Xco-7_@AG|DwM@zj|onT}2vN<1bKbU2R9 zfS?O>5nObgU;`f4b;B}93051rW$;s1ezitz)S0yf*3F4vn>s>(V@3#Ppb^_vnG1Aa z>mJA#7=df%2=Yr_|IHuOGpoRI{ck%LIt}}Z%+)}4(5K*?cgwBvE}YTuTdx0Y!YJQ8 zSO#_|+#-Mf_d0U%7Qg?0u!ELpB?Bb`|0xENsZ%SbmZ6gG)MD-UTe~Wr*YM;$Kj6s+ z&P4<-@^d^K<>z>K!=K~5EH`B@_-u)%INsAE&hYrhe+bB32ex44`rq#%`jz^`b&^@( Vmg|4~XPfVbx$kS(`CqO7{{(w_C+YwI literal 0 HcmV?d00001 diff --git a/projects/Find_imdb_rating/.vscode/settings.json b/projects/Find_imdb_rating/.vscode/settings.json new file mode 100644 index 000000000..a70797d8e --- /dev/null +++ b/projects/Find_imdb_rating/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.pythonPath": "/Users/utkarsh/Desktop/open_source/oscenv/bin/python3" +} \ No newline at end of file diff --git a/projects/Find_imdb_rating/find_IMDb_rating.py b/projects/Find_imdb_rating/find_IMDb_rating.py index e0fe3351e..8fa2bc596 100644 --- a/projects/Find_imdb_rating/find_IMDb_rating.py +++ b/projects/Find_imdb_rating/find_IMDb_rating.py @@ -2,28 +2,37 @@ from bs4 import BeautifulSoup # Defining variables and url -title = str(input("Enter the title of movie/series: ")).lower() -release = str(input("Enter the year of release: ")).lower() +title = str(input("Enter the title of movie/series: ")) +release = str(input("Enter the year of release: ")) query = "+".join(title.split()) -URL = f"https://www.imdb.com/search/title/?title={query}" - -s = requests.session() # Setting up session - -try: - response = s.get(URL) - soup = BeautifulSoup(response.content, features="lxml") - containers = soup.find_all("div", class_="lister-item-content") - - for result in containers: - name = result.h3.a.text.lower() - year = result.h3.find( - "span", class_="lister-item-year text-muted unbold" - ).text.lower() - - if title in name and release in year: - rating = result.find("div", - class_="inline-block ratings-imdb-rating")[ - "data-value"] - print(f"Rating of {name}:", rating) -except Exception: - print("Try again with valid combination of tile and release year") +#RL = f"https://www.imdb.com/search/title/?title={query}" + +request_link = 'http://www.omdbapi.com/?i=tt3896198&apikey=2c84f11f' + +#api_key = 2c84f11f + +request = request_link + '&t=' + query +result = requests.get(request) + +print(result.text) + +# s = requests.session() # Setting up session + +# try: +# response = s.get(URL) +# soup = BeautifulSoup(response.content, features="lxml") +# containers = soup.find_all("div", class_="lister-item-content") + +# for result in containers: +# name = result.h3.a.text.lower() +# year = result.h3.find( +# "span", class_="lister-item-year text-muted unbold" +# ).text.lower() + +# if title in name and release in year: +# rating = result.find("div", +# class_="inline-block ratings-imdb-rating")[ +# "data-value"] +# print(f"Rating of {name}:", rating) +# except Exception: +# print("Try again with valid combination of tile and release year") From 5475eb71f7d526ed09b9552239ff1738025eb21a Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Mon, 14 Sep 2020 14:47:13 +0530 Subject: [PATCH 02/21] Fetching IMDB Rating Completed --- projects/Find_imdb_rating/find_IMDb_rating.py | 37 +++++-------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/projects/Find_imdb_rating/find_IMDb_rating.py b/projects/Find_imdb_rating/find_IMDb_rating.py index 8fa2bc596..5a8f75c23 100644 --- a/projects/Find_imdb_rating/find_IMDb_rating.py +++ b/projects/Find_imdb_rating/find_IMDb_rating.py @@ -1,38 +1,21 @@ import requests -from bs4 import BeautifulSoup +import json # Defining variables and url title = str(input("Enter the title of movie/series: ")) -release = str(input("Enter the year of release: ")) +year = str(input("Enter the year of release: ")) query = "+".join(title.split()) -#RL = f"https://www.imdb.com/search/title/?title={query}" request_link = 'http://www.omdbapi.com/?i=tt3896198&apikey=2c84f11f' -#api_key = 2c84f11f +#final request link using OMDb API +request = request_link + '&t=' + query + '&y=' + year -request = request_link + '&t=' + query -result = requests.get(request) +#requesting data from OMBd +response = requests.get(request) -print(result.text) +#converting to json (dictionary) +response = response.json() -# s = requests.session() # Setting up session - -# try: -# response = s.get(URL) -# soup = BeautifulSoup(response.content, features="lxml") -# containers = soup.find_all("div", class_="lister-item-content") - -# for result in containers: -# name = result.h3.a.text.lower() -# year = result.h3.find( -# "span", class_="lister-item-year text-muted unbold" -# ).text.lower() - -# if title in name and release in year: -# rating = result.find("div", -# class_="inline-block ratings-imdb-rating")[ -# "data-value"] -# print(f"Rating of {name}:", rating) -# except Exception: -# print("Try again with valid combination of tile and release year") +#printing imdb rating +print(response['imdbRating']) From b637d28a49f18b697ee0f89db21933567948c83e Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Tue, 15 Sep 2020 01:03:05 +0530 Subject: [PATCH 03/21] Web scraping working --- projects/Find_imdb_rating/.DS_Store | Bin 0 -> 6148 bytes projects/Find_imdb_rating/find_IMDb_rating.py | 55 +++++++++++++----- projects/Find_imdb_rating/movies.txt | 2 + projects/Find_imdb_rating/ratings.csv | 1 + projects/Find_imdb_rating/webscrape.py | 45 ++++++++++++++ 5 files changed, 90 insertions(+), 13 deletions(-) create mode 100644 projects/Find_imdb_rating/.DS_Store create mode 100644 projects/Find_imdb_rating/movies.txt create mode 100644 projects/Find_imdb_rating/ratings.csv create mode 100644 projects/Find_imdb_rating/webscrape.py diff --git a/projects/Find_imdb_rating/.DS_Store b/projects/Find_imdb_rating/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2d56b9c371a362527acc5d6170fe28d019fef3ad GIT binary patch literal 6148 zcmeHKyH3ME5S)V)K{SzQD6gc7L``#voFYXU_<(@1Ku94$2nsrPd<$O*vkxAQp{0Ob zX?O1Sc6{~}-a7zk`q&%;BLG9XAf6@kP1ePGw&NMWq|aDljs+^zSoW&FPYCw_SGd6% z4OyT3dtBf_^Vb;T4o~yd=CWRGYBJPT?!F+7af@b)@v_BGT7*y_ z6bJ=Efl%O|DZrjBHrzLi7z%^}p}>a%@_)#5!Q$8&>aT-Aj_eAaTLVi++L2nD(d?AmlB{eMRP z;r`zx#ViyE1^$!*X;7V2Q+|^7*51cSug&yx`n$1K%NaU{08XS8AAYIJGG<+IYz>vp RywZtr5D;C$LV@2<;0=|1DqjEq literal 0 HcmV?d00001 diff --git a/projects/Find_imdb_rating/find_IMDb_rating.py b/projects/Find_imdb_rating/find_IMDb_rating.py index 5a8f75c23..840e523f3 100644 --- a/projects/Find_imdb_rating/find_IMDb_rating.py +++ b/projects/Find_imdb_rating/find_IMDb_rating.py @@ -1,21 +1,50 @@ +from bs4 import BeautifulSoup import requests import json -# Defining variables and url -title = str(input("Enter the title of movie/series: ")) -year = str(input("Enter the year of release: ")) -query = "+".join(title.split()) +# Setting up session +s = requests.session() -request_link = 'http://www.omdbapi.com/?i=tt3896198&apikey=2c84f11f' +#File to write movies into +file1 = open ("ratings.csv", "w") -#final request link using OMDb API -request = request_link + '&t=' + query + '&y=' + year +with open("movies.txt", "r") as file2: + for line in file2: + title = line.lower() + query = "+".join(title.split()) + URL = "https://www.imdb.com/search/title/?title=" + query + try: + response = s.get(URL) -#requesting data from OMBd -response = requests.get(request) + content = response.content -#converting to json (dictionary) -response = response.json() + soup = BeautifulSoup(response.content) + containers = soup.find_all("div", class_="lister-item-content") + for result in containers: + name1 = result.h3.a.text + name = result.h3.a.text.lower() + # print(name) + # year = result.h3.find( + # "span", class_="lister-item-year text-muted unbold" + # ).text.lower() -#printing imdb rating -print(response['imdbRating']) + if title in name: + rating = result.find("div",class_="inline-block ratings-imdb-rating")["data-value"] + print(f"Rating of {name1}:", rating) + genre = result.p.find("span", class_="genre") + file1.write(name1) + file1.write(',') + file1.write(rating) + file1.write(',') + file1.write(genre) + file1.write('\n') + + # for x in genre: + # print(x) + + + except Exception: + print("Try again with valid combination of tile and release year") + +file1.close() + diff --git a/projects/Find_imdb_rating/movies.txt b/projects/Find_imdb_rating/movies.txt new file mode 100644 index 000000000..b53dd5741 --- /dev/null +++ b/projects/Find_imdb_rating/movies.txt @@ -0,0 +1,2 @@ +Iron Man +Star Wars \ No newline at end of file diff --git a/projects/Find_imdb_rating/ratings.csv b/projects/Find_imdb_rating/ratings.csv new file mode 100644 index 000000000..f833c48f4 --- /dev/null +++ b/projects/Find_imdb_rating/ratings.csv @@ -0,0 +1 @@ +Star Wars: Episode IX - The Rise of Skywalker,6.6, \ No newline at end of file diff --git a/projects/Find_imdb_rating/webscrape.py b/projects/Find_imdb_rating/webscrape.py new file mode 100644 index 000000000..3e505e930 --- /dev/null +++ b/projects/Find_imdb_rating/webscrape.py @@ -0,0 +1,45 @@ +from bs4 import BeautifulSoup +import requests + +# Defining variables and url +title = str(input("Enter the title of movie/series: ")).lower() +release = str(input("Enter the year of release: ")).lower() +query = "+".join(title.split()) +URL = "https://www.imdb.com/search/title/?title=" + query + +print(URL) + +s = requests.session() # Setting up session + +file1 = open ("ratings.csv", "a") + +try: + response = s.get(URL) + + content = response.content + + soup = BeautifulSoup(response.content) + containers = soup.find_all("div", class_="lister-item-content") + for result in containers: + name1 = result.h3.a.text + name = result.h3.a.text.lower() + # print(name) + year = result.h3.find( + "span", class_="lister-item-year text-muted unbold" + ).text.lower() + + if title in name and release in year: + rating = result.find("div",class_="inline-block ratings-imdb-rating")["data-value"] + print(f"Rating of {name1}:", rating) + file1.write(name1) + file1.write(',') + file1.write(rating) + file1.write('\n') + genre = result.p.find("span", class_="genre") + for x in genre: + print(x) + +except Exception: + print("Try again with valid combination of tile and release year") + +file1.close() \ No newline at end of file From afb2cecb6a5c3d9e7e00ccab65f040b36012e85b Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Tue, 15 Sep 2020 01:09:20 +0530 Subject: [PATCH 04/21] web scraping working --- .DS_Store | Bin 8196 -> 8196 bytes projects/.DS_Store | Bin 14340 -> 14340 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/.DS_Store b/.DS_Store index c38e1694b78114c02a310d5523b5209f140becb5..0133a09bb99f7b4c9bfcfff53fcd4a402bebdc7c 100644 GIT binary patch delta 27 icmZp1XmQxEMv%|KLPx>K%%WCDq1w#SeDf|rFFpWwRtO*f delta 27 icmZp1XmQxEMv%|QTt~s!(7aYhq1xQsVDm0PFFpWvUI+{T diff --git a/projects/.DS_Store b/projects/.DS_Store index 93026f5587270e32ba454c5aadc665032610fffa..49fc79de9989b448e572a7b30e8cf9269eec82f5 100644 GIT binary patch delta 27 icmZoEXerp>q{U}pp`&1AW>Kr7P;F*uzBxc^3oih99SBDN delta 27 icmZoEXerp>q{U}suA^XVXkM$MP;G8*usJ|$3oih8B?vPB From f9d47b505cd910e542ccdf3829d85cd6491385e2 Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Tue, 15 Sep 2020 01:27:29 +0530 Subject: [PATCH 05/21] Working on genres --- .DS_Store | Bin 8196 -> 8196 bytes projects/.DS_Store | Bin 14340 -> 14340 bytes projects/Find_imdb_rating/find_IMDb_rating.py | 25 +++++++++++------- projects/Find_imdb_rating/movies.txt | 3 +-- projects/Find_imdb_rating/ratings.csv | 3 ++- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.DS_Store b/.DS_Store index 0133a09bb99f7b4c9bfcfff53fcd4a402bebdc7c..2a71eab8a3d3f935d00a561ea30453043b4b3e37 100644 GIT binary patch delta 21 ccmZp1XmQxET9CuY$UsNI*wAG2X2C!{081kVO8@`> delta 21 ccmZp1XmQxET9CuU!a_&E$joB%X2C!{089`DV*mgE diff --git a/projects/.DS_Store b/projects/.DS_Store index 49fc79de9989b448e572a7b30e8cf9269eec82f5..e8b4bdee242175d75dc87aca947cdeacbda9dd94 100644 GIT binary patch delta 21 ccmZoEXerp>sKsGqWT2y9Y-qCCQ)@Rb08EeuasU7T delta 21 ccmZoEXerp>sKsGoVWFd7WM;A1Q)@Rb08M=ciU0rr diff --git a/projects/Find_imdb_rating/find_IMDb_rating.py b/projects/Find_imdb_rating/find_IMDb_rating.py index 840e523f3..6cb95037f 100644 --- a/projects/Find_imdb_rating/find_IMDb_rating.py +++ b/projects/Find_imdb_rating/find_IMDb_rating.py @@ -10,7 +10,9 @@ with open("movies.txt", "r") as file2: for line in file2: - title = line.lower() + x = line.split(", ") + title = x[0].lower() + release = x[1] query = "+".join(title.split()) URL = "https://www.imdb.com/search/title/?title=" + query try: @@ -24,23 +26,28 @@ name1 = result.h3.a.text name = result.h3.a.text.lower() # print(name) - # year = result.h3.find( - # "span", class_="lister-item-year text-muted unbold" - # ).text.lower() + year = result.h3.find( + "span", class_="lister-item-year text-muted unbold" + ).text.lower() - if title in name: + # print(name) + # print(year) + # print(release) + + if title in name and release in year: rating = result.find("div",class_="inline-block ratings-imdb-rating")["data-value"] print(f"Rating of {name1}:", rating) + genres = [] genre = result.p.find("span", class_="genre") + for x in genre: + genres.append(x) file1.write(name1) file1.write(',') file1.write(rating) - file1.write(',') - file1.write(genre) + # file1.write(',') file1.write('\n') - # for x in genre: - # print(x) + except Exception: diff --git a/projects/Find_imdb_rating/movies.txt b/projects/Find_imdb_rating/movies.txt index b53dd5741..f3f334e1a 100644 --- a/projects/Find_imdb_rating/movies.txt +++ b/projects/Find_imdb_rating/movies.txt @@ -1,2 +1 @@ -Iron Man -Star Wars \ No newline at end of file +Star Wars, 1980 \ No newline at end of file diff --git a/projects/Find_imdb_rating/ratings.csv b/projects/Find_imdb_rating/ratings.csv index f833c48f4..f5e602fb1 100644 --- a/projects/Find_imdb_rating/ratings.csv +++ b/projects/Find_imdb_rating/ratings.csv @@ -1 +1,2 @@ -Star Wars: Episode IX - The Rise of Skywalker,6.6, \ No newline at end of file +Star Wars: Episode V - The Empire Strikes Back,8.7, +Action, Adventure, Fantasy From 68794d804d21a6c69e0008a61262dec386663351 Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Tue, 15 Sep 2020 15:40:23 +0530 Subject: [PATCH 06/21] Web scraping and putting content in CSV Working --- .DS_Store | Bin 8196 -> 8196 bytes projects/.DS_Store | Bin 14340 -> 14340 bytes projects/Find_imdb_rating/.DS_Store | Bin 6148 -> 6148 bytes projects/Find_imdb_rating/find_IMDb_rating.py | 109 ++++++++++-------- projects/Find_imdb_rating/movies.txt | 1 - projects/Find_imdb_rating/products.csv | 15 +++ projects/Find_imdb_rating/ratings.csv | 2 - 7 files changed, 75 insertions(+), 52 deletions(-) delete mode 100644 projects/Find_imdb_rating/movies.txt create mode 100644 projects/Find_imdb_rating/products.csv delete mode 100644 projects/Find_imdb_rating/ratings.csv diff --git a/.DS_Store b/.DS_Store index 2a71eab8a3d3f935d00a561ea30453043b4b3e37..0133a09bb99f7b4c9bfcfff53fcd4a402bebdc7c 100644 GIT binary patch delta 21 ccmZp1XmQxET9CuU!a_&E$joB%X2C!{089`DV*mgE delta 21 ccmZp1XmQxET9CuY$UsNI*wAG2X2C!{081kVO8@`> diff --git a/projects/.DS_Store b/projects/.DS_Store index e8b4bdee242175d75dc87aca947cdeacbda9dd94..49fc79de9989b448e572a7b30e8cf9269eec82f5 100644 GIT binary patch delta 21 ccmZoEXerp>sKsGoVWFd7WM;A1Q)@Rb08M=ciU0rr delta 21 ccmZoEXerp>sKsGqWT2y9Y-qCCQ)@Rb08EeuasU7T diff --git a/projects/Find_imdb_rating/.DS_Store b/projects/Find_imdb_rating/.DS_Store index 2d56b9c371a362527acc5d6170fe28d019fef3ad..b1ddaf8b7c2f87174407cce440218098c404f749 100644 GIT binary patch delta 138 zcmZoMXfc=|#>B`mu~2NHo+2a5!~pBb3XBavMvtd14?_V%5ko#h3PUMFGD8VNF@qkE zE@mk6%*jtq%E?b+U|CJ*u~2NHo+2aD!~pBb1|lqz`5E0N_c9u7{>~`CHd%n_!)A64eh#3z Z&5TUnnJ4p$7&0 Date: Tue, 15 Sep 2020 16:19:30 +0530 Subject: [PATCH 07/21] Project Completed, readme left --- projects/Find_imdb_rating/find_IMDb_rating.py | 19 ++++++++-- projects/Find_imdb_rating/products.csv | 38 ++++++++++++++----- 2 files changed, 43 insertions(+), 14 deletions(-) diff --git a/projects/Find_imdb_rating/find_IMDb_rating.py b/projects/Find_imdb_rating/find_IMDb_rating.py index bce8e71df..4e5c5a76d 100644 --- a/projects/Find_imdb_rating/find_IMDb_rating.py +++ b/projects/Find_imdb_rating/find_IMDb_rating.py @@ -2,18 +2,30 @@ import requests import json import pandas as pd +import os # Setting up session s = requests.session() -#File to write movies into - -films = ['Star Wars: Episode V - The Empire Strikes Back', 'The wolf of wall street', 'Shutter Island'] +# List contaiting all the films for which data has to be scraped from IMDB +films = [] +# Lists contaiting web scraped data names = [] ratings = [] genres = [] +# Define path where your films are present +path = "/Users/utkarsh/Desktop/films" + +# Films with extensions +filmswe = os.listdir(path) + +for film in filmswe: + # Append into my films list (without extensions) + films.append(os.path.splitext(film)[0]) + # print(os.path.splitext(film)[0]) + for line in films: # x = line.split(", ") title = line.lower() @@ -46,7 +58,6 @@ if title in name: #scraping rating rating = result.find("div",class_="inline-block ratings-imdb-rating")["data-value"] - # print(f"Rating of {name1}:", rating) #scraping genre genre = result.p.find("span", class_="genre") genre = genre.contents[0] diff --git a/projects/Find_imdb_rating/products.csv b/projects/Find_imdb_rating/products.csv index 1855cb66c..2e8a8f60e 100644 --- a/projects/Find_imdb_rating/products.csv +++ b/projects/Find_imdb_rating/products.csv @@ -1,15 +1,33 @@ Film Name,Rating,Genre -Star Wars: Episode V - The Empire Strikes Back,8.7," -Action, Adventure, Fantasy " -Star Wars: Episode V - The Empire Strikes Back: Deleted Scenes,8.7," -Short, Action, Drama " The Wolf of Wall Street,8.2," Biography, Crime, Drama " The Wolf of Wall Street,6.5," Drama " -Shutter Island,8.2," -Mystery, Thriller " -Shutter Island: Into the Lighthouse,8.8," -Documentary, Short " -Shutter Island: Behind the Shutters,8.4," -Documentary, Short " +Star Wars: Episode IX - The Rise of Skywalker,6.6," +Action, Adventure, Fantasy " +Solo: A Star Wars Story,6.9," +Action, Adventure, Sci-Fi " +Star Wars: The Clone Wars,8.2," +Animation, Action, Adventure " +Star Wars,8.6," +Action, Adventure, Fantasy " +Star Wars: Episode I - The Phantom Menace,6.5," +Action, Adventure, Fantasy " +Star Wars: The Last Jedi,7," +Action, Adventure, Fantasy " +Star Wars: Episode V - The Empire Strikes Back,8.7," +Action, Adventure, Fantasy " +Star Wars: The Force Awakens,7.9," +Action, Adventure, Sci-Fi " +Star Wars: Episode VI - Return of the Jedi,8.3," +Action, Adventure, Fantasy " +Star Wars: Rebels,8," +Animation, Action, Adventure " +Star Wars: Episode III - Revenge of the Sith,7.5," +Action, Adventure, Fantasy " +Star Wars: Episode II - Attack of the Clones,6.5," +Action, Adventure, Fantasy " +Star Wars Jedi: Fallen Order,8.7," +Action, Adventure, Drama " +Star Wars: Resistance,4.9," +Animation, Action, Adventure " From eb62fdc2d53065832f8de07abe3f9549f6f3c9ba Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Tue, 15 Sep 2020 16:29:56 +0530 Subject: [PATCH 08/21] Initial Readme changes --- projects/Find_imdb_rating/README.md | 19 +++++++++++ projects/Find_imdb_rating/webscrape.py | 45 -------------------------- 2 files changed, 19 insertions(+), 45 deletions(-) delete mode 100644 projects/Find_imdb_rating/webscrape.py diff --git a/projects/Find_imdb_rating/README.md b/projects/Find_imdb_rating/README.md index e69de29bb..612311b09 100644 --- a/projects/Find_imdb_rating/README.md +++ b/projects/Find_imdb_rating/README.md @@ -0,0 +1,19 @@ +# Find IMDB Ratings + +A short description about the script must be mentioned here. + +### Prerequisites + +Modules required to be able to use the script successfully and how to install them. (Including a requirements.txt file will work.) + +### How to run the script + +Steps on how to run the script along with suitable examples. + +### Screenshot/GIF showing the sample use of the script + +Add a jpeg/png/gif file here. + +## *Author Name* + + Utkarsh Bajaj diff --git a/projects/Find_imdb_rating/webscrape.py b/projects/Find_imdb_rating/webscrape.py deleted file mode 100644 index 3e505e930..000000000 --- a/projects/Find_imdb_rating/webscrape.py +++ /dev/null @@ -1,45 +0,0 @@ -from bs4 import BeautifulSoup -import requests - -# Defining variables and url -title = str(input("Enter the title of movie/series: ")).lower() -release = str(input("Enter the year of release: ")).lower() -query = "+".join(title.split()) -URL = "https://www.imdb.com/search/title/?title=" + query - -print(URL) - -s = requests.session() # Setting up session - -file1 = open ("ratings.csv", "a") - -try: - response = s.get(URL) - - content = response.content - - soup = BeautifulSoup(response.content) - containers = soup.find_all("div", class_="lister-item-content") - for result in containers: - name1 = result.h3.a.text - name = result.h3.a.text.lower() - # print(name) - year = result.h3.find( - "span", class_="lister-item-year text-muted unbold" - ).text.lower() - - if title in name and release in year: - rating = result.find("div",class_="inline-block ratings-imdb-rating")["data-value"] - print(f"Rating of {name1}:", rating) - file1.write(name1) - file1.write(',') - file1.write(rating) - file1.write('\n') - genre = result.p.find("span", class_="genre") - for x in genre: - print(x) - -except Exception: - print("Try again with valid combination of tile and release year") - -file1.close() \ No newline at end of file From b8ddc017803a90205f697ea4c271b426fd0a47b3 Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Tue, 15 Sep 2020 17:53:08 +0530 Subject: [PATCH 09/21] Updating readme --- projects/Find_imdb_rating/README.md | 14 +++++++++++--- .../{products.csv => film_ratings.csv} | 0 projects/Find_imdb_rating/find_IMDb_rating.py | 2 +- projects/Find_imdb_rating/requirements.txt | 12 ++++++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) rename projects/Find_imdb_rating/{products.csv => film_ratings.csv} (100%) create mode 100644 projects/Find_imdb_rating/requirements.txt diff --git a/projects/Find_imdb_rating/README.md b/projects/Find_imdb_rating/README.md index 612311b09..34d104ff6 100644 --- a/projects/Find_imdb_rating/README.md +++ b/projects/Find_imdb_rating/README.md @@ -1,14 +1,22 @@ # Find IMDB Ratings -A short description about the script must be mentioned here. +This script is used to fetch the Ratings and Genre of the films in your films folder, the data is scraped from IMDB's official website and store in a csv file. The csv file can be used for analysis then, sorting acc to rating etc. + +Input: -> Path of the directory which contains the films. + +Output: -> A new csv file is made - 'film_ratings.csv' which contains the ratings for the films in your directory. ### Prerequisites -Modules required to be able to use the script successfully and how to install them. (Including a requirements.txt file will work.) +This program uses and external dependency of 'BeautifulSoup' (for web scraping), 'requests' (for fetching content of the webpage), 'pandas' (to make csv), 'os' (to get data from directory). +These libraries can be installed easily by using the following command: pip install -r requirements.txt ### How to run the script -Steps on how to run the script along with suitable examples. +-> Install the requirements. +-> Inside the find_IMDb_rating.py, update the directory path. +-> Type the following command: python find_IMDb_rating.py +-> A csv file with rating will be created in the same directory as the python file. ### Screenshot/GIF showing the sample use of the script diff --git a/projects/Find_imdb_rating/products.csv b/projects/Find_imdb_rating/film_ratings.csv similarity index 100% rename from projects/Find_imdb_rating/products.csv rename to projects/Find_imdb_rating/film_ratings.csv diff --git a/projects/Find_imdb_rating/find_IMDb_rating.py b/projects/Find_imdb_rating/find_IMDb_rating.py index 4e5c5a76d..dda0a1163 100644 --- a/projects/Find_imdb_rating/find_IMDb_rating.py +++ b/projects/Find_imdb_rating/find_IMDb_rating.py @@ -76,4 +76,4 @@ df = pd.DataFrame({'Film Name':names,'Rating':ratings,'Genre':genres}) #making csv using pandas -df.to_csv('products.csv', index=False, encoding='utf-8') +df.to_csv('film_ratings.csv', index=False, encoding='utf-8') diff --git a/projects/Find_imdb_rating/requirements.txt b/projects/Find_imdb_rating/requirements.txt new file mode 100644 index 000000000..9fa16667a --- /dev/null +++ b/projects/Find_imdb_rating/requirements.txt @@ -0,0 +1,12 @@ +beautifulsoup4==4.9.1 +bs4==0.0.1 +certifi==2020.6.20 +chardet==3.0.4 +idna==2.10 +pandas==1.1.2 +python-dateutil==2.8.1 +pytz==2020.1 +requests==2.24.0 +six==1.15.0 +soupsieve==2.0.1 +urllib3==1.25.10 From a3a022dac3fabfb5f22cc7c7194acfce061599cc Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Tue, 15 Sep 2020 17:55:11 +0530 Subject: [PATCH 10/21] Updating readme 2 --- projects/Find_imdb_rating/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/Find_imdb_rating/README.md b/projects/Find_imdb_rating/README.md index 34d104ff6..bd8d44151 100644 --- a/projects/Find_imdb_rating/README.md +++ b/projects/Find_imdb_rating/README.md @@ -8,15 +8,15 @@ Output: -> A new csv file is made - 'film_ratings.csv' which contains the rating ### Prerequisites -This program uses and external dependency of 'BeautifulSoup' (for web scraping), 'requests' (for fetching content of the webpage), 'pandas' (to make csv), 'os' (to get data from directory). +This program uses and external dependency of 'BeautifulSoup' (for web scraping), 'requests' (for fetching content of the webpage), 'pandas' (to make the csv file), 'os' (to get data from directory).
These libraries can be installed easily by using the following command: pip install -r requirements.txt ### How to run the script --> Install the requirements. --> Inside the find_IMDb_rating.py, update the directory path. --> Type the following command: python find_IMDb_rating.py --> A csv file with rating will be created in the same directory as the python file. +-> Install the requirements.
+-> Inside the find_IMDb_rating.py, update the directory path.
+-> Type the following command: python find_IMDb_rating.py
+-> A csv file with rating will be created in the same directory as the python file.
### Screenshot/GIF showing the sample use of the script From b986e1f1956f690d4dd4da1cf783c2f76c7d49f2 Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Tue, 15 Sep 2020 18:21:37 +0530 Subject: [PATCH 11/21] Updating readme 3 --- film_ratings.csv | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 film_ratings.csv diff --git a/film_ratings.csv b/film_ratings.csv new file mode 100644 index 000000000..858a40c5e --- /dev/null +++ b/film_ratings.csv @@ -0,0 +1,47 @@ +Film Name,Rating,Genre +The Wolf of Wall Street,8.2," +Biography, Crime, Drama " +The Wolf of Wall Street,6.5," +Drama " +Star Wars: Episode IX - The Rise of Skywalker,6.6," +Action, Adventure, Fantasy " +Solo: A Star Wars Story,6.9," +Action, Adventure, Sci-Fi " +Star Wars: The Clone Wars,8.2," +Animation, Action, Adventure " +Star Wars,8.6," +Action, Adventure, Fantasy " +Star Wars: Episode I - The Phantom Menace,6.5," +Action, Adventure, Fantasy " +Star Wars: The Last Jedi,7," +Action, Adventure, Fantasy " +Star Wars: Episode V - The Empire Strikes Back,8.7," +Action, Adventure, Fantasy " +Star Wars: The Force Awakens,7.9," +Action, Adventure, Sci-Fi " +Star Wars: Episode VI - Return of the Jedi,8.3," +Action, Adventure, Fantasy " +Star Wars: Rebels,8," +Animation, Action, Adventure " +Star Wars: Episode III - Revenge of the Sith,7.5," +Action, Adventure, Fantasy " +Star Wars: Episode II - Attack of the Clones,6.5," +Action, Adventure, Fantasy " +Star Wars Jedi: Fallen Order,8.7," +Action, Adventure, Drama " +Star Wars: Resistance,4.9," +Animation, Action, Adventure " +Fight Club,8.8," +Drama " +Superhero Fight Club,8.6," +Short, Action, Fantasy " +Female Fight Club,4.2," +Action, Crime, Drama " +Superhero Fight Club 2.0,8.1," +Short, Action, Fantasy " +A Lure: Teen Fight Club,3.6," +Action, Crime, Drama " +Fight Club,4.6," +Action, Drama, Sport " +Fight Club: Members Only,3.2," +Action, Crime " From 98f8f390e77edcf07c275c31371852f4308a06a5 Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Tue, 15 Sep 2020 18:24:14 +0530 Subject: [PATCH 12/21] Updating readme 3 --- film_ratings.csv | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 film_ratings.csv diff --git a/film_ratings.csv b/film_ratings.csv deleted file mode 100644 index 858a40c5e..000000000 --- a/film_ratings.csv +++ /dev/null @@ -1,47 +0,0 @@ -Film Name,Rating,Genre -The Wolf of Wall Street,8.2," -Biography, Crime, Drama " -The Wolf of Wall Street,6.5," -Drama " -Star Wars: Episode IX - The Rise of Skywalker,6.6," -Action, Adventure, Fantasy " -Solo: A Star Wars Story,6.9," -Action, Adventure, Sci-Fi " -Star Wars: The Clone Wars,8.2," -Animation, Action, Adventure " -Star Wars,8.6," -Action, Adventure, Fantasy " -Star Wars: Episode I - The Phantom Menace,6.5," -Action, Adventure, Fantasy " -Star Wars: The Last Jedi,7," -Action, Adventure, Fantasy " -Star Wars: Episode V - The Empire Strikes Back,8.7," -Action, Adventure, Fantasy " -Star Wars: The Force Awakens,7.9," -Action, Adventure, Sci-Fi " -Star Wars: Episode VI - Return of the Jedi,8.3," -Action, Adventure, Fantasy " -Star Wars: Rebels,8," -Animation, Action, Adventure " -Star Wars: Episode III - Revenge of the Sith,7.5," -Action, Adventure, Fantasy " -Star Wars: Episode II - Attack of the Clones,6.5," -Action, Adventure, Fantasy " -Star Wars Jedi: Fallen Order,8.7," -Action, Adventure, Drama " -Star Wars: Resistance,4.9," -Animation, Action, Adventure " -Fight Club,8.8," -Drama " -Superhero Fight Club,8.6," -Short, Action, Fantasy " -Female Fight Club,4.2," -Action, Crime, Drama " -Superhero Fight Club 2.0,8.1," -Short, Action, Fantasy " -A Lure: Teen Fight Club,3.6," -Action, Crime, Drama " -Fight Club,4.6," -Action, Drama, Sport " -Fight Club: Members Only,3.2," -Action, Crime " From 05a6bc7d3a5ca0427fe00ab436f764abd561718d Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Tue, 15 Sep 2020 18:27:32 +0530 Subject: [PATCH 13/21] Updating readme 3 --- projects/Find_imdb_rating/README.md | 2 +- projects/Find_imdb_rating/film_ratings.csv | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/projects/Find_imdb_rating/README.md b/projects/Find_imdb_rating/README.md index bd8d44151..7000afd63 100644 --- a/projects/Find_imdb_rating/README.md +++ b/projects/Find_imdb_rating/README.md @@ -1,6 +1,6 @@ # Find IMDB Ratings -This script is used to fetch the Ratings and Genre of the films in your films folder, the data is scraped from IMDB's official website and store in a csv file. The csv file can be used for analysis then, sorting acc to rating etc. +This script is used to fetch the Ratings and Genre of the films in your films folder that match with ones on IMDb, the data is scraped from IMDB's official website and store in a csv file. The csv file can be used for analysis then, sorting acc to rating etc. Input: -> Path of the directory which contains the films. diff --git a/projects/Find_imdb_rating/film_ratings.csv b/projects/Find_imdb_rating/film_ratings.csv index 2e8a8f60e..858a40c5e 100644 --- a/projects/Find_imdb_rating/film_ratings.csv +++ b/projects/Find_imdb_rating/film_ratings.csv @@ -31,3 +31,17 @@ Star Wars Jedi: Fallen Order,8.7," Action, Adventure, Drama " Star Wars: Resistance,4.9," Animation, Action, Adventure " +Fight Club,8.8," +Drama " +Superhero Fight Club,8.6," +Short, Action, Fantasy " +Female Fight Club,4.2," +Action, Crime, Drama " +Superhero Fight Club 2.0,8.1," +Short, Action, Fantasy " +A Lure: Teen Fight Club,3.6," +Action, Crime, Drama " +Fight Club,4.6," +Action, Drama, Sport " +Fight Club: Members Only,3.2," +Action, Crime " From 3ffdfff644fa8b3b19644c67521a0f2bcbc9b07d Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj Date: Tue, 15 Sep 2020 18:44:07 +0530 Subject: [PATCH 14/21] Adding Screenshots --- projects/Find_imdb_rating/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/Find_imdb_rating/README.md b/projects/Find_imdb_rating/README.md index 7000afd63..12b8355af 100644 --- a/projects/Find_imdb_rating/README.md +++ b/projects/Find_imdb_rating/README.md @@ -20,7 +20,10 @@ These libraries can be installed easily by using the following command: pip inst ### Screenshot/GIF showing the sample use of the script -Add a jpeg/png/gif file here. +![Screenshot 2020-09-15 at 6 28 24 PM](https://user-images.githubusercontent.com/44445191/93214767-32022800-f783-11ea-893d-7f45240b6dc5.png) + +![Screenshot 2020-09-15 at 6 20 55 PM](https://user-images.githubusercontent.com/44445191/93214776-375f7280-f783-11ea-90a3-dcd29a84d7fc.png) + ## *Author Name* From 6d01c0b252afa98170947207c4d1925c1ffb582d Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj Date: Tue, 15 Sep 2020 18:45:06 +0530 Subject: [PATCH 15/21] updating screenshots --- projects/Find_imdb_rating/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/Find_imdb_rating/README.md b/projects/Find_imdb_rating/README.md index 12b8355af..41cdeceeb 100644 --- a/projects/Find_imdb_rating/README.md +++ b/projects/Find_imdb_rating/README.md @@ -20,10 +20,13 @@ These libraries can be installed easily by using the following command: pip inst ### Screenshot/GIF showing the sample use of the script -![Screenshot 2020-09-15 at 6 28 24 PM](https://user-images.githubusercontent.com/44445191/93214767-32022800-f783-11ea-893d-7f45240b6dc5.png) +Folder : ![Screenshot 2020-09-15 at 6 20 55 PM](https://user-images.githubusercontent.com/44445191/93214776-375f7280-f783-11ea-90a3-dcd29a84d7fc.png) +CSV File: +![Screenshot 2020-09-15 at 6 28 24 PM](https://user-images.githubusercontent.com/44445191/93214767-32022800-f783-11ea-893d-7f45240b6dc5.png) + ## *Author Name* From 6f1ad08c969c57d4d0b34520cbc6b54fa644294f Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Tue, 15 Sep 2020 18:47:03 +0530 Subject: [PATCH 16/21] final project --- projects/Find_imdb_rating/film_ratings.csv | 47 ------------------- projects/Find_imdb_rating/find_IMDb_rating.py | 3 +- 2 files changed, 2 insertions(+), 48 deletions(-) delete mode 100644 projects/Find_imdb_rating/film_ratings.csv diff --git a/projects/Find_imdb_rating/film_ratings.csv b/projects/Find_imdb_rating/film_ratings.csv deleted file mode 100644 index 858a40c5e..000000000 --- a/projects/Find_imdb_rating/film_ratings.csv +++ /dev/null @@ -1,47 +0,0 @@ -Film Name,Rating,Genre -The Wolf of Wall Street,8.2," -Biography, Crime, Drama " -The Wolf of Wall Street,6.5," -Drama " -Star Wars: Episode IX - The Rise of Skywalker,6.6," -Action, Adventure, Fantasy " -Solo: A Star Wars Story,6.9," -Action, Adventure, Sci-Fi " -Star Wars: The Clone Wars,8.2," -Animation, Action, Adventure " -Star Wars,8.6," -Action, Adventure, Fantasy " -Star Wars: Episode I - The Phantom Menace,6.5," -Action, Adventure, Fantasy " -Star Wars: The Last Jedi,7," -Action, Adventure, Fantasy " -Star Wars: Episode V - The Empire Strikes Back,8.7," -Action, Adventure, Fantasy " -Star Wars: The Force Awakens,7.9," -Action, Adventure, Sci-Fi " -Star Wars: Episode VI - Return of the Jedi,8.3," -Action, Adventure, Fantasy " -Star Wars: Rebels,8," -Animation, Action, Adventure " -Star Wars: Episode III - Revenge of the Sith,7.5," -Action, Adventure, Fantasy " -Star Wars: Episode II - Attack of the Clones,6.5," -Action, Adventure, Fantasy " -Star Wars Jedi: Fallen Order,8.7," -Action, Adventure, Drama " -Star Wars: Resistance,4.9," -Animation, Action, Adventure " -Fight Club,8.8," -Drama " -Superhero Fight Club,8.6," -Short, Action, Fantasy " -Female Fight Club,4.2," -Action, Crime, Drama " -Superhero Fight Club 2.0,8.1," -Short, Action, Fantasy " -A Lure: Teen Fight Club,3.6," -Action, Crime, Drama " -Fight Club,4.6," -Action, Drama, Sport " -Fight Club: Members Only,3.2," -Action, Crime " diff --git a/projects/Find_imdb_rating/find_IMDb_rating.py b/projects/Find_imdb_rating/find_IMDb_rating.py index dda0a1163..5451881cd 100644 --- a/projects/Find_imdb_rating/find_IMDb_rating.py +++ b/projects/Find_imdb_rating/find_IMDb_rating.py @@ -16,7 +16,8 @@ genres = [] # Define path where your films are present -path = "/Users/utkarsh/Desktop/films" +# For eg: "/Users/utkarsh/Desktop/films" +path = # Write the path here # Films with extensions filmswe = os.listdir(path) From 104b505581b7440b164ecad7f495f7c754539eef Mon Sep 17 00:00:00 2001 From: Aditya Jetely Date: Wed, 16 Sep 2020 14:59:57 +0530 Subject: [PATCH 17/21] Delete settings.json --- projects/Find_imdb_rating/.vscode/settings.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 projects/Find_imdb_rating/.vscode/settings.json diff --git a/projects/Find_imdb_rating/.vscode/settings.json b/projects/Find_imdb_rating/.vscode/settings.json deleted file mode 100644 index a70797d8e..000000000 --- a/projects/Find_imdb_rating/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "python.pythonPath": "/Users/utkarsh/Desktop/open_source/oscenv/bin/python3" -} \ No newline at end of file From e94253c4be265155df71228dd18588f57fdc9604 Mon Sep 17 00:00:00 2001 From: Aditya Jetely Date: Wed, 16 Sep 2020 15:01:41 +0530 Subject: [PATCH 18/21] Update find_IMDb_rating.py --- projects/Find_imdb_rating/find_IMDb_rating.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/Find_imdb_rating/find_IMDb_rating.py b/projects/Find_imdb_rating/find_IMDb_rating.py index 5451881cd..6e79d8afa 100644 --- a/projects/Find_imdb_rating/find_IMDb_rating.py +++ b/projects/Find_imdb_rating/find_IMDb_rating.py @@ -17,7 +17,7 @@ # Define path where your films are present # For eg: "/Users/utkarsh/Desktop/films" -path = # Write the path here +path = input("Enter the path where your films are: ") # Films with extensions filmswe = os.listdir(path) From aa86c21c44186e86f77a80d1ec579a6de5016314 Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Mon, 21 Sep 2020 10:39:47 +0530 Subject: [PATCH 19/21] Added .gitignore --- projects/Find_imdb_rating/.DS_Store | Bin 6148 -> 0 bytes projects/Find_imdb_rating/.gitignore | 1 + 2 files changed, 1 insertion(+) delete mode 100644 projects/Find_imdb_rating/.DS_Store create mode 100644 projects/Find_imdb_rating/.gitignore diff --git a/projects/Find_imdb_rating/.DS_Store b/projects/Find_imdb_rating/.DS_Store deleted file mode 100644 index b1ddaf8b7c2f87174407cce440218098c404f749..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKyH3ME5S)V)K~O}Zp}dkR5;cv9oFYXU_<(?8Ku7^c2?5dhGx!C*5@vS~h>2+t zf?er$?y+;X9?ACr5C*IA29p;VQr{e2c13vh;ofqV_h!C!ifp9gtZ|@Xu+sNqlWav2u5dr zOmSJl+R*3->G2WL%I}YtpsREKsNo2ip?g=r6=*83ZOxvX|3m&Vt&jXB#apg`EAYn@ z2%Y>aAMm5n*}Cz0a@Izca~3g)tEEC?y>SU(L-vsa9klT%b;e~0YeShu`jt-fi+~E^ K&K39p1>OJ}*hn(~ diff --git a/projects/Find_imdb_rating/.gitignore b/projects/Find_imdb_rating/.gitignore new file mode 100644 index 000000000..e43b0f988 --- /dev/null +++ b/projects/Find_imdb_rating/.gitignore @@ -0,0 +1 @@ +.DS_Store From 77870c9c206805e26a19b19490c70aca3c8be24a Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Mon, 21 Sep 2020 11:21:16 +0530 Subject: [PATCH 20/21] removed .DS_Store --- .DS_Store | Bin 8196 -> 8196 bytes projects/.DS_Store | Bin 14340 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 projects/.DS_Store diff --git a/.DS_Store b/.DS_Store index 0133a09bb99f7b4c9bfcfff53fcd4a402bebdc7c..e9bc5c7f5c136ff845515146ba52985b0cb93657 100644 GIT binary patch delta 78 zcmV-U0I~msK!iZBClLY2lPD2@C>MKsH8MCXAT>07EFgO}IX5gIG&44ReF+E`B{4lo kU~PGNdwhLM8XF_ge bRdr2m-OR}s1mziLZT=v*i)r&}kw|U;|L7Lp diff --git a/projects/.DS_Store b/projects/.DS_Store deleted file mode 100644 index 49fc79de9989b448e572a7b30e8cf9269eec82f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14340 zcmeHO+in|G6g|_X;G~zNZF)&nfe}JLsYJP`1ffbHEv1E03Mp+RK*o;U#?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m-YvJvyKqLsZ@K=r38Q@X z_cE|U;ZE@Pf3F}HZ}I#8zjx3Qtz@8N;6KGcGIeI<%raE+om#9Ne`{C8^8-A2&-Zxp zfpZbTi~Jl9NBKD(-tgymi*i%;g3p$CisL;!;tY>}{D*+tbzlotuK)cWqF<>`Tql_o VZn^%)f42F4nESqlo&VMP{|}BWC;k8c From dd55e6c1ccc7a1f33f80725bb19ed5c95c06a8cf Mon Sep 17 00:00:00 2001 From: Utkarsh Bajaj <44445191+utkarshbajaj@users.noreply.github.com> Date: Mon, 21 Sep 2020 11:24:48 +0530 Subject: [PATCH 21/21] Removed DS --- .DS_Store | Bin 8196 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index e9bc5c7f5c136ff845515146ba52985b0cb93657..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHM%We}%6umbD(hiSwUXy?rsfC4vM1**RmqrN3iD4`r@x&%11Tfw1ifL$fneKK% z5`xTv4`2t2`G8r?2aLp;KVXIU1V)+_E9O>JI}baE6(gjnvZ~JQs(WsA9lNT1Z2-V* z!#xEs3IGOGf#zOnb|_+8)Q-}X^avgjAD|4=aE01QLS3{1S^=$qRzNGD75EVqpl7xy z##f&EYE-vc0jw)W#r>Hr&2}Q_l z_r{Sn?-Y4)h=GAa$l-B&e0EBPlPBL} z*RJl}dwL9`*XZ5fd$0JAFBfAwZbVr-To6|UJAUXSc8PO;!?vASk1dzYp-CRZwimEa zl0BD^%iY^v;PT}xZv<{6;}q3^VWf;y*&JD0JA3-Vn00o1eau=rck%p~HGbyY`g+P3 zIeO|+{y}YJb?w>u^VhT{DwrIN(5J39+Bal%=;BqDl6B(S);d3$W^1LX-o5+wALujt z2L}6x`iFlS9vK}zc<9jKvN`D3mB-ak-18*&d6@MZY@r%@Zn17xyr4Q4v!`*NF zT0U6hG~*JfJzW=W(JTui!Vdo2yd8#iP-WSbd%o>3e>%wWIOa9sDWX+)PzafbH0O~m z){?&bw~{lRxz;j{DZ_-cG62$<7s@nDECoDZsZ=^sNJb4f4ij(#X6aMB3a{XI_!Itu zcklr|!DsBjgLnjw<2YWz%lIq)hBH{gdAx%Qir>|GcYkiprVw4ij(2yd7zREMsx&5e zDVU)hH$gl42H{ToS?tr-TlVw7Hb$9FfgEuQw0kF{y;BTvCTxu{NIQ|i6KH@Ztr}eg zVoy?x>-0K7_EU&=I0H7L=;uF)s*6_OJ1DSA#T*si0dime{r@}6tV3!Av;seh0@yuO zoXXPOw7z1r-kH