User:Francg/expub/thesis/prototype: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 5: Line 5:
'''Prototype'''
'''Prototype'''


Extracting data (in this case I scrap URL's / web links only) from: https://www.reddit.com/
Extracting data (scrapping URL's / web links from content only)  
<br>from: https://www.reddit.com/


<br>
<br>

Revision as of 12:56, 5 October 2017


Prototype

Extracting data (scrapping URL's / web links from content only)
from: https://www.reddit.com/



Run Python (I did it from virtual environment)
from bs4 import BeautifulSoup
import requests
url = raw_input("https://www.reddit.com/: ")
r = requests.get("https://www.reddit.com/" +url)
data = r.text
soup = BeautifulSoup(data)
for link in soup.find_all('a'):
print(link.get('href'))


Bs4-test-reddit1