From a30d8d31cc5a2edf59812b432400396a0523178d Mon Sep 17 00:00:00 2001 From: Ayush Date: Mon, 15 Jan 2018 02:21:01 +0530 Subject: [PATCH] Solution 3 --- Solutions/AK-007/Task3/web.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Solutions/AK-007/Task3/web.py diff --git a/Solutions/AK-007/Task3/web.py b/Solutions/AK-007/Task3/web.py new file mode 100644 index 0000000..09502a1 --- /dev/null +++ b/Solutions/AK-007/Task3/web.py @@ -0,0 +1,17 @@ +from urllib.request import urlopen +from bs4 import BeautifulSoup + +web="https://scirate.com/" + +page=urlopen(web) + +soup=BeautifulSoup(page,"html.parser") + +all_names=soup.find_all('div',attrs={'class' : 'title'}) +all_links=soup.find_all('a',attrs={'title':'Download PDF'}) +i=0 +for name in all_names: + print('Name = '+name.text) + if(i