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

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
<div style="font-size:100%; letter-spacing: 0.05em; line-height: 1.6em; margin-left: 80px; margin-right: 140px;">


<center>
<br>
'''Prototype'''


Extracting data (in this case I just scrap URL's / web links) from:
<br> e.g. the website where I have my thesis outline stored: [https://pzwiki.wdka.nl/mediadesign/User:Francg/expub/thesis/thesis-outline Thesis Outline]


 
<br>
'''Extracting URL's from any website'''
<br>
</center>


Run Python (I did it from virtual environment)
Run Python (I did it from virtual environment)

Revision as of 01:24, 5 October 2017


Prototype

Extracting data (in this case I just scrap URL's / web links) from:
e.g. the website where I have my thesis outline stored: Thesis Outline



Run Python (I did it from virtual environment)
from bs4 import BeautifulSoup
import requests
url = raw_input("Enter a website to extract the URL's from: ")
r = requests.get("http://" +url)
data = r.text
soup = BeautifulSoup(data)
for link in soup.find_all('a'):

   print(link.get('href'))