Created
September 29, 2023 05:23
-
-
Save skittleson/498ff5e355c63e917e7937e245a9bd5b to your computer and use it in GitHub Desktop.
Who Is Hiring
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
import re | |
if __name__ == '__main__': | |
html = requests.get(r'https://news.ycombinator.com/item?id=37351667&p=1') | |
soup = BeautifulSoup(html.text,'html.parser') | |
all_spans = soup.find_all('span', class_='commtext') | |
for span in all_spans: | |
comment_content = span.text.strip() | |
matches = re.findall(r'data analyst', comment_content, re.IGNORECASE) | |
if len(matches) > 0: | |
print(comment_content) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment