Skip to the content.

Python parser for good gaming tips • 2 min read

Description

Finds websites so you can get better at tron

from newspaper import Article
import random
from googlesearch import search

url = []
listOfGetGoodTips = []
imVerySleepDeprived = ['That was rough, ', 'maybe you need some training, ', 'That was hard to watch, ', 'LMAO better luck next time,', 'Here are some gaming tips, ']

query = "gaming tips"
for j in search(query, tld="co.in", num=8, stop=8, pause=2):
    url.append(j)


for i in url:
    article = Article(i)
    article.download()
    article.parse()
    listOfGetGoodTips.append(random.choice(imVerySleepDeprived) + article.title + ' ' + i)
print(listOfGetGoodTips)
['Here are some gaming tips, Top 10 Gaming Tips and Tricks from the Pros https://www.hp.com/ca-en/shop/offer.aspx?p=top-10-gaming-tips-and-tricks-pro&lang=en-CA', 'maybe you need some training, 10 Tips to Become a Better Gamer https://www.drinkhydrant.com/blogs/news/10-tips-to-become-a-better-gamer', 'That was rough, Game Tips - Gaming Reviews, News, Tips and More. https://kotaku.com/game-tips', 'maybe you need some training, Tech - Gaming - Tips, Tricks and Hacks for Doing Everything Better https://lifehacker.com/tech/gaming', 'LMAO better luck next time,Tips for a Successful Gaming Session https://www.enostech.com/tips-for-a-successful-gaming-session/', 'That was hard to watch, Tips for a Successful Gaming Session https://www.enostech.com/tips-for-a-successful-gaming-session/#Pick_The_Right_Console', 'That was rough, Tips for a Successful Gaming Session https://www.enostech.com/tips-for-a-successful-gaming-session/#Get_Reliable_Accessories_and_Gear', 'That was rough, Tips for a Successful Gaming Session https://www.enostech.com/tips-for-a-successful-gaming-session/#Playlist']