Created
September 16, 2015 11:29
-
-
Save yask123/920047058ce1cf07a732 to your computer and use it in GitHub Desktop.
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 | |
| from bs4 import BeautifulSoup | |
| import urllib2 | |
| response=urllib2.urlopen('http://jeequery.com/about/') | |
| html = response.read() | |
| soup = BeautifulSoup(html, 'html.parser') | |
| a = soup.find_all('a') | |
| for each in a: | |
| if str(each).find('facebook.com/') >0 : | |
| print 'Fb link: ',each['href'], | |
| fbresponse = urllib2.urlopen(str(each['href'])) | |
| html2 = fbresponse.read() | |
| soup2 = BeautifulSoup(html2, 'html.parser') | |
| name = str(soup2.title.string) | |
| print ' Full Name : ',name[:name.find('|')] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment