Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Commit 2cc4d1e

Browse files
Scrape News from Google News (Updated)
1 parent 00dd7f0 commit 2cc4d1e

File tree

1 file changed

+8
-5
lines changed
  • Scripts/Web_Scrappers/google_news_(ui_based)

1 file changed

+8
-5
lines changed

Scripts/Web_Scrappers/google_news_(ui_based)/main.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def fetch_news(link, file_name='custom_news.txt'):
4444
if(file_name=='custom_news.txt'):
4545
print('Your news in ready in "custom_news.txt" file.')
4646

47-
ans = input("Do you want to fetch latest World News (y/n) ?")
47+
ans = input("Do you want to fetch latest World News (y/n) ? ")
4848
if(ans=='y'):
4949
print('Fetching World News... This might take a while')
5050
fetch_news('https://news.google.com/topics/CAAqJggKIiBDQkFTRWdvSUwyMHZNRGx1YlY4U0FtVnVHZ0pKVGlnQVAB?hl=en-IN&gl=IN&ceid=IN%3Aen', 'world_news.txt')
@@ -224,9 +224,12 @@ def fetch_news(link, file_name='custom_news.txt'):
224224
else:
225225
c1=False
226226
print('')
227-
if(c1==True and c2==True):
228-
print('Fetching your custom News...')
229-
fetch_news(link=fetch)
230-
print('Thank You')
227+
if(c1==True):
228+
if(c2==True):
229+
print('Fetching your custom News...')
230+
fetch_news(link=fetch)
231+
print('Thank You')
232+
else:
233+
print('The program will now exit!')
231234
else:
232235
print('The program will now exit!')

0 commit comments

Comments
 (0)