from IPython.display import YouTubeVideo
import re
def Youtube_URL_to_text(url_link):
return re.sub('https://youtu.be/','',url_link)
url = 'https://youtu.be/53b_nnGcnBY'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/eIVifBVJQIw'
YouTubeVideo(Youtube_URL_to_text(url))
You can download Course Materials here: https://www.udacity.com/wiki/ud032?_ga=1.138276592.1304109578.1466579963#!#datasets-used-in-this-course
url = 'https://youtu.be/eQpSC0IFhv0'
YouTubeVideo(Youtube_URL_to_text(url))
Video: XML Design Principles See the official XML Origin and Goals
"Free as in Beer" means - free in the sense of costing no money; gratis.
url = 'https://youtu.be/4xsz7OkDJgM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/Ti8K9FmNW1w'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/SIsG0HYYwY4'
YouTubeVideo(Youtube_URL_to_text(url))
See documentation on XPath syntax
url = 'https://youtu.be/OeiBJ_D-ZsM'
YouTubeVideo(Youtube_URL_to_text(url))
#!/usr/bin/env python
# Your task here is to extract data from xml on authors of an article
# and add it to a list, one item for an author.
# See the provided data structure for the expected format.
# The tags for first name, surname and email should map directly
# to the dictionary keys
import xml.etree.ElementTree as ET
article_file = "exampleResearchArticle.xml"
def get_root(fname):
tree = ET.parse(fname)
return tree.getroot()
def get_authors(root):
authors = []
for author in root.findall('./fm/bibl/aug/au'):
data = {
"fnm": None,
"snm": None,
"email": None
}
# YOUR CODE HERE
authors.append(data)
return authors
def test():
solution = [{'fnm': 'Omer', 'snm': 'Mei-Dan', 'email': 'omer@extremegate.com'}, {'fnm': 'Mike', 'snm': 'Carmont', 'email': 'mcarmont@hotmail.com'}, {'fnm': 'Lior', 'snm': 'Laver', 'email': 'laver17@gmail.com'}, {'fnm': 'Meir', 'snm': 'Nyska', 'email': 'nyska@internet-zahav.net'}, {'fnm': 'Hagay', 'snm': 'Kammar', 'email': 'kammarh@gmail.com'}, {'fnm': 'Gideon', 'snm': 'Mann', 'email': 'gideon.mann.md@gmail.com'}, {'fnm': 'Barnaby', 'snm': 'Clarck', 'email': 'barns.nz@gmail.com'}, {'fnm': 'Eugene', 'snm': 'Kots', 'email': 'eukots@gmail.com'}]
root = get_root(article_file)
data = get_authors(root)
assert data[0] == solution[0]
assert data[1]["fnm"] == solution[1]["fnm"]
test()
One way of solving the exercise is listed below. There are couple of things to note about this solution:
def get_author(root):
authors = []
for author in root.findall('./fm/bibl/aug/au'):
data = {
"fnm": None,
"snm": None,
"email": None
}
data["fnm"] = author.find('./fnm').text
data["snm"] = author.find('./snm').text
data["email"] = author.find('./email').text
authors.append(data)
return authors
url = 'https://youtu.be/YSEGZMBbxTk'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/RJyVIgUUemE'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/ax7aaLNZkPA'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/aR6Z7ggnjEY'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/rHQ8z4fIthA'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/6rSJRr9OtHM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/aJD8WJa3-9A'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/ojd7xXOd_64'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/vgJ0ZlxzSiw'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/CZnFt1rOfwc'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/_rDjie-TaS8'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/QFjKVSmxODY'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/97FYi0SQFQ8'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/J1gn4ZBLkt4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/DZa6UOGet_g'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/JA7oIPaf9PM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/dzqOwmxK3j4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/h12MQ3d1Z1Y'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/dj46LqDBFYM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/uqCSn9Q9ARk'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/3S73cNbhuAk'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/G3RjHqqQSgE'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/B9vjn8IYaSg'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/hpyNAYJODqw'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/Y7TNXALXut8'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/mADDYP7ldl4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/5xY3sCBHkOk'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/PMbcv9AYQT4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/bCAkWxApvQM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/_5AnMdslWg4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/cF0AEW4SIUM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/vWBMgSQvsVk'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/fSwaNltHTio'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/CU4igXr9xTw'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/V4gbPVdUOpw'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/e8zSXnyskro'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/OB7iJnEY0Tg'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/-laXTx9corQ'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/YG8zfeRXAvM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/PhvA7DCgtpw'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/tt-XjT9RdDg'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/TE9uvPwvpu4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/ZFn9xVQ0hD4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/v3EkXogyIL4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/O7kWdC8ffEw'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/lMwSjDYgCq0'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/TIayTr4y9RA'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/q23Nlo1Rfn4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/lXoiI0gx3MU'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/WZRsqdNrC1A'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/1Gp4l-ZTCVk'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/BYAyquwZmdM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/yLeLxDyXCSY'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/8swA-PqlEP0'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/GUD6yl0A1Aw'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/N5T8ouw1SGc'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/wrjCB1abNyM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/-GlHaeB-vic'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/bR7EoKjN0EM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/6vfZYhhmuLU'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/CvB2qkSk1Zc'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/NRCs22HJ-vI'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/bcwFahJsww0'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/eeV5K5HKVx4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/_7Vqou7k7fI'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/BGt2DQer6I4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/mIIL-p2gaK4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/LQq5F77ANiY'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/l6SDnhM7B_k'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/T_LpzJl-EVE'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/7DCw86WMpYo'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/3kycKkbQK6A'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/AaLIKufl_mY'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/1FjqstT1faI'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/fnbLMcd0FGQ'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/P1aYwQhPnPQ'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/06LsRU4pmkA'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/4Ywln5AT6Hc'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/Zd0PAgb6vY4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/pn3MunHovMc'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/YWZ-bgnZWaM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/n7v-y8UrVJ0'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/t_ZSrov187k'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/q7a9w02Uepw'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/vek87HVWexE'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/JyX6j00Q2Cg'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/pxUvIP4PQt0'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/1OwIbj9dcLo'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/GYhOEJ8EXkg'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/c0IcUiF_kXs'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/eIvm5rEMZGY'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/pXfWdBuWw74'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/GfK7GW3V-W0'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/6sDkIE_nAGI'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/jjMw4Ju-1CM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/6a-YgbrEACk'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/h6M4x9aXx5g'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/V2UMNT9VBrw'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/tsAh4HonzIw'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/dFGlIC9nI1Q'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/hi6g1NE3sPk'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/JVYH9B6Obpg'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/PlJ_dfdEbR0'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/6r5Xc-_lhEI'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/j5l5UvE3Odw'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/MbJfmI7kzQI'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/8uhfnWgiBHM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/8iX-7hwKX1Q'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/B3iYl-2HSXI'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/OcPW6xp8DfE'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/mpMHJQalRck'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/bgOky14w77Q'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/tuXc0Ycy_yM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/oFWNOvxuIRQ'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/mjPfjzOWiDw'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/l2Nab0LY_cI'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/xiqleK_px_Q'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/pOJAW4jTjr0'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/0sl_mbV-fho'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/mRNyMEoCoY0'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/UZMklqP5-p4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/FZ8KVv1VOK4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/_kupbxrZBds'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/6wBjB3Ca5H4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/cleAY1-Jboc'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/0TV8kTw9-HM'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/tSgPhxZdhLk'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/vL9FcO_9dCA'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/iGnSNfzaLf4'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/quszTmIRG8M'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/vek87HVWexE'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/JyX6j00Q2Cg'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/1OwIbj9dcLo'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/GYhOEJ8EXkg'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/c0IcUiF_kXs'
YouTubeVideo(Youtube_URL_to_text(url))
url = 'https://youtu.be/pH3VusOq9tc'
YouTubeVideo(Youtube_URL_to_text(url))