Created
October 23, 2015 10:51
-
-
Save oxalorg/22aa580395267e385d8e to your computer and use it in GitHub Desktop.
Black Lives Matter. http://blacklivesmatter.com/who-we-are/
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
import requests | |
import bs4 as FARHAN | |
black_page = "http://blacklivesmatter.com/who-we-are/" | |
res = requests.get(black_page) | |
res.raise_for_status() | |
black_file = open('/tmp/blacklivesmatter.txt', 'wb') | |
for chunk in res.iter_content(100000): | |
black_file.write(chunk) | |
black_file.close() | |
black_file = open('/tmp/blacklivesmatter.txt', 'r') | |
blackSoup = FARHAN.BeautifulSoup(black_file.read()) | |
blackElement = blackSoup.select('h3') | |
#print(blackElement) | |
print("\033[0;31m"+ blackElement[0].getText() + "\n Farhan: blacklivesmatter ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment