Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Added Scraping Hacker news website script #105

Merged
merged 2 commits into from
Aug 17, 2020

Conversation

GudlaArunKumar
Copy link
Contributor

#CH20

Issue #92
About PR: Created script for scraping the first 2 pages of Hacker news website wherein user can read some cool tech news as articles which has Upvotes more than 100.

if len(vote): #To check if class "score" exists or not
points = int(vote[0].getText().replace(' points', ''))
if points > 100: # To get votes/points more than 100
hackerNews.append({'title': title, 'link': href,'votes':points})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update it to this ⬇
hackerNews.append({'title': title, 'link': href, 'votes': points})

Follow good code practice - here
Signed by - @Neilblaze

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure okay

'''
Program uses requests module to get web data from URL and BeautifulSoup module to parse the web data
as HTML using html parser.
Install requests and BeautifulSoup module before executing!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
Better add README (guide) along with this inside the folder same as your <filename> & you're good to go!

Signed by - @Neilblaze

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. I will add readme inside the folder

@GudlaArunKumar
Copy link
Contributor Author

@Neilblaze I have made the changes.Please check now

@Neilblaze
Copy link

Good job @GudlaArunKumar 🎉

Copy link

@Neilblaze Neilblaze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀
@ankitdobhal merge status OK!

@powerexploit powerexploit merged commit d56a8c1 into powerexploit:master Aug 17, 2020
@GudlaArunKumar GudlaArunKumar deleted the ScrappingHackerNews branch August 17, 2020 07:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants