Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 25, 2022. It is now read-only.

Commit 8023218

Browse files
committed
2 parents 946a271 + 9034610 commit 8023218

File tree

17 files changed

+1002
-0
lines changed

17 files changed

+1002
-0
lines changed

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ Sr no | Project Name | Author
6161
37 | [Find IMDB movie ratings](https://github.com/chavarera/python-mini-projects/tree/master/projects/Find%20IMDb%20rating) | [ShivSt](https://github.com/ShivSt)
6262
38 | [Convert dictionary to python object](https://github.com/chavarera/python-mini-projects/tree/master/projects/convert_dictionary_to_python_object) | [Varun-22](https://github.com/Varun-22)
6363
39 | [move files to alphabetically arranged folders](https://github.com/chavarera/python-mini-projects/tree/master/projects/Write%20script%20to%20move%20files%20into%20alphabetically%20ordered%20folder) | [Chathura Nimesh](https://github.com/kana800/)
64+
40 | [Scrape Youtube video comment](https://github.com/chavarera/python-mini-projects/tree/master/projects/Web%20scraping%20a%20youtube%20comment) | [Saicharan67](https://github.com/Saicharan67)
65+
41 | [Website Summerization](https://github.com/chavarera/python-mini-projects/tree/master/projects/Web%20scraping%20a%20youtube%20comment) | [Believe Ohiozua](https://github.com/believeohiozua)
66+
42 | [Text To speech(mp3)](https://github.com/chavarera/python-mini-projects/tree/master/projects/TextToSpeech) | [Sergej Dikun](https://github.com/Serhazor)
67+

‎projects/TextToSpeech/abc.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Thanks to Gail Cleaver, Beth Barrack, Bingo Nightly, Emily Webber and Sharon Counts. Finally, special thanks to Casey Cromwell. Radio Lab is produced by WNYC New York public radio, and distributed by NPR, National Public Radio.

‎projects/TextToSpeech/txtToSpeech.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from gtts import gTTS
2+
import os
3+
file = open("abc.txt", "r").read()
4+
5+
speech = gTTS(text=file, lang='en', slow=False)
6+
speech.save("voice.mp3")
7+
os.system("voice.mp3")
8+
9+
#print(file)

‎projects/TextToSpeech/voice.mp3‎

81.5 KB
Binary file not shown.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Created on Tue Jul 21 16:55:39 2020
4+
5+
@author: hp
6+
"""
7+
8+
from selenium import webdriver
9+
import csv
10+
import time
11+
12+
items=[]
13+
driver=webdriver.Chrome(r"C:/Users/hp/Anaconda3/chromedriver.exe")
14+
15+
driver.get('https://www.youtube.com/watch?v=iFPMz36std4')
16+
17+
driver.execute_script('window.scrollTo(1, 500);')
18+
19+
#now wait let load the comments
20+
time.sleep(5)
21+
22+
driver.execute_script('window.scrollTo(1, 3000);')
23+
24+
25+
username_elems = driver.find_elements_by_xpath('//*[@id="author-text"]')
26+
comment_elems = driver.find_elements_by_xpath('//*[@id="content-text"]')
27+
for username, comment in zip(username_elems, comment_elems):
28+
item = {}
29+
item['Author'] = username.text
30+
item['Comment'] = comment.text
31+
items.append(item)
32+
filename = 'C:/Users/hp/Desktop/commentlist.csv'
33+
with open(filename, 'w', newline='', encoding='utf-8') as f:
34+
w = csv.DictWriter(f,['Author','Comment'])
35+
w.writeheader()
36+
for item in items:
37+
w.writerow(item)
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
db.sqlite3
58+
59+
# Flask stuff:
60+
instance/
61+
.webassets-cache
62+
63+
# Scrapy stuff:
64+
.scrapy
65+
66+
# Sphinx documentation
67+
docs/_build/
68+
69+
# PyBuilder
70+
target/
71+
72+
# Jupyter Notebook
73+
.ipynb_checkpoints
74+
75+
# pyenv
76+
.python-version
77+
78+
# celery beat schedule file
79+
celerybeat-schedule
80+
81+
# SageMath parsed files
82+
*.sage.py
83+
84+
# Environments
85+
.env
86+
.venv
87+
venv/
88+
env.bak/
89+
venv.bak/
90+
env/
91+
92+
# Spyder project settings
93+
.spyderproject
94+
.spyproject
95+
96+
# Rope project settings
97+
.ropeproject
98+
99+
# mkdocs documentation
100+
/site
101+
102+
# mypy
103+
.mypy_cache/
104+
105+
__pycache__
106+
.vscode
107+
settings.json
108+
109+
Dependency directories
110+
node_modules/
111+
jspm_packages/
112+
113+
# Optional npm cache directory
114+
.npm
115+
.DS_Store
116+
.DS_Store
117+
datasets
118+
datasets/
119+
new_datasets/
120+
node_modules
121+
yarn.lock
122+
app
123+
__pycache__/
124+
dist
125+
build
126+
mlclassification-darwin-x64
127+
release-builds
128+
Classifi
129+
app
130+
dist
131+
build
132+
Summarize.spec
133+
__pycache__
134+
applog.log
135+
csv/
136+
beneficiary.csv
137+
.DS_Store
138+
applog.log
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Website Summarization API
2+
3+
This project is carried out for the purpose of building a machine learning model for summarising a website from urls;
4+
5+
## Getting Started
6+
7+
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
8+
9+
10+
### Prerequisites
11+
12+
Python distribution
13+
14+
```
15+
Anaconda
16+
```
17+
18+
### Installing
19+
20+
Install Anaconda python distribution on your system
21+
22+
Create a virtual environment called env.
23+
24+
```
25+
python -m venv app
26+
```
27+
28+
Activate the virtual environment
29+
30+
```
31+
LINUX/Mac: source app/bin/activate
32+
33+
Windows: app\Scripts\activate
34+
```
35+
36+
Upgrade to the latest pip
37+
38+
```
39+
pip install --upgrade pip
40+
```
41+
42+
Install dependencies using requirements file
43+
44+
```
45+
pip install -r requirements.txt
46+
```
47+
**Note: Your virtual environment must always be activated before running any command**
48+
49+
## Deployment
50+
51+
Start app (Make sure to enter a valid website to an existing website)
52+
53+
54+
Example of valid commands
55+
56+
```
57+
python app.py simple --url https://facebook.com --sentence 1 --language english
58+
python app.py simple --url https://facebook.com
59+
python app.py simple --url https://korapay.com
60+
python app.py bulk --path ./csv/valid_websites.csv
61+
```
62+
63+
64+
### APIs
65+
66+
This are command options in full:
67+
68+
```
69+
A command line utility for website Summarization.
70+
-----------------------------------------------
71+
These are common commands for this app.
72+
73+
positional arguments:
74+
action This has to be 'summarize'
75+
76+
optional arguments:
77+
-h, --help show this help message and exit
78+
--website PATH website of the url to be summarised
79+
80+
81+
## License
82+
83+
This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details
84+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /