From 0b9ebf8fb4b2b1b0762f76eb527c052ae025d9a1 Mon Sep 17 00:00:00 2001
From: aslesha <cb.en.u4cse16259@cb.students.amrita.edu>
Date: Sat, 2 Feb 2019 12:57:32 +0530
Subject: [PATCH] Upload New File

---
 lab6/pyweb.ipynb | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 lab6/pyweb.ipynb

diff --git a/lab6/pyweb.ipynb b/lab6/pyweb.ipynb
new file mode 100644
index 0000000..e97b409
--- /dev/null
+++ b/lab6/pyweb.ipynb
@@ -0,0 +1,43 @@
+{
+  "cells": [
+    {
+      "metadata": {
+        "trusted": true
+      },
+      "cell_type": "code",
+      "source": "import requests\nfrom bs4 import BeautifulSoup\npage = requests.get(\"http://forecast.weather.gov/MapClick.php?lat=37.7772&lon=-122.4168\")\nsoup = BeautifulSoup(page.content, 'html.parser')\nseven_day = soup.find(id=\"detailed-forecast-body\")\nforecast_items = seven_day.find_all(class_=\"row row-odd row-forecast\")\nforecast_items2 = seven_day.find_all(class_=\"row row-even row-forecast\")\ntonight = forecast_items[0]\ntonight2 = forecast_items2[0]\n\nx=list(tonight.children)[0]\nprint(x)\nprint(list(x.children)[0].get_text())\nprint(\"---------------------------------------------------------\")\nprint(tonight.prettify())\nprint(tonight2.prettify())",
+      "execution_count": null,
+      "outputs": []
+    },
+    {
+      "metadata": {
+        "trusted": true
+      },
+      "cell_type": "code",
+      "source": "",
+      "execution_count": null,
+      "outputs": []
+    }
+  ],
+  "metadata": {
+    "kernelspec": {
+      "name": "python36",
+      "display_name": "Python 3.6",
+      "language": "python"
+    },
+    "language_info": {
+      "mimetype": "text/ x - python",
+      "nbconvert_exporter": "python",
+      "version": "3.6.0",
+      "name": "python",
+      "file_extension": ".py",
+      "pygments_lexer": "ipython2",
+      "codemirror_mode": {
+        "version": 2,
+        "name": "ipython"
+      }
+    }
+  },
+  "nbformat": 4,
+  "nbformat_minor": 2
+}
\ No newline at end of file
-- 
GitLab