<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>live population record Archives -</title>
	<atom:link href="https://mitindia.in/tag/live-population-record/feed/" rel="self" type="application/rss+xml" />
	<link>https://mitindia.in/tag/live-population-record/</link>
	<description></description>
	<lastBuildDate>Sun, 13 Dec 2020 08:27:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://mitindia.in/wp-content/uploads/2023/03/cropped-android-chrome-512x512-1-32x32.png</url>
	<title>live population record Archives -</title>
	<link>https://mitindia.in/tag/live-population-record/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Data Science &#8211; 2 [web scraping]</title>
		<link>https://mitindia.in/data-science-2-web-scraping/</link>
		
		<dc:creator><![CDATA[SKB]]></dc:creator>
		<pubDate>Sun, 13 Dec 2020 08:23:14 +0000</pubDate>
				<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[data science]]></category>
		<category><![CDATA[Machine Learning]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[live population record]]></category>
		<category><![CDATA[live stock market data]]></category>
		<guid isPermaLink="false">http://www.mitindia.in/?p=1079</guid>

					<description><![CDATA[<p>Data science with using Python In the following example we will be retrieving live population records using BeautifulSoup package.[web scraping] Live Population record #data science with Python - world's population stat import bs4 import pandas as pd import requests url = 'https://www.worldometers.info/world-population/#:~:text=Population%20in%20the%20world%20is,it%20was%20at%20around%202%25.' result = requests.get(url) soup = bs4.BeautifulSoup(result.text,'lxml') pop = soup.find_all('table' ,class_= 'table table-striped table-bordered [&#8230;]</p>
<p>The post <a href="https://mitindia.in/data-science-2-web-scraping/">Data Science &#8211; 2 [web scraping]</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1>Data science with using Python</h1>
<p>In the following example we will be retrieving live population records using BeautifulSoup package.[web scraping]</p>
<ol>
<li>Live Population record</li>
</ol>
<pre class="EnlighterJSRAW" data-enlighter-language="null">#data science with Python - world's population stat
import bs4 
import pandas as pd 
import requests 

url = 'https://www.worldometers.info/world-population/#:~:text=Population%20in%20the%20world%20is,it%20was%20at%20around%202%25.'

result = requests.get(url) 

soup = bs4.BeautifulSoup(result.text,'lxml') 
pop = soup.find_all('table' ,class_= 'table table-striped table-bordered table-hover table-condensed table-list')

data = [] 
for i in pop:
        strong = i.find('strong')
        data.append(strong.string)
#to remove duplicate
mylist = list(dict.fromkeys(data))
print("World's Population:",mylist, "in Cr")
#print(pop)
</pre>
<p>Output of the above code is :</p>
<blockquote><p><strong>World&#8217;s Population: [&#8216;7,794,798,739&#8217;] in Cr</strong></p></blockquote>
<p>2. To retrieve live currency [1 US$equal to INR] and BSE SENSEX live price using web scraping.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null"># US$ vs INR - Live Scrapping &amp; Live share market 
import bs4 
import pandas as pd 
import requests 
url = 'https://in.finance.yahoo.com/quote/INR=X?p=INR=X'
result = requests.get(url) 
soup = bs4.BeautifulSoup(result.text,'lxml') 

val= soup.find_all('div' ,class_= 'My(6px) Pos(r) smartphone_Mt(6px)')
# to store data
data = [] 
for i in val: 
  span = i.find('span') 
  data.append(span.string)
res = str(data)[1:-1] 
print("1 US$ equal to  :", res, 'INR') 

# share market live
url2 = 'https://in.finance.yahoo.com/quote/%5EBSESN?p=^BSESN'
result2 = requests.get(url2) 
soup = bs4.BeautifulSoup(result2.text,'lxml') 
#search for maincounter-number class
val2= soup.find_all('div' ,class_= 'My(6px) Pos(r) smartphone_Mt(6px)')
# to store data
data2 = [] 
for i in val2: 
  span = i.find('span') 
  data2.append(span.string)
res2 = str(data2)[1:-1] 
print("BSE Market Price   :", res2, 'INR') 

#store data to excel 
f=open('sharemarket.csv', 'w')
f.write(res2)
f.close()
print('Stored succesfully')

from tkinter import *
root = Tk()
root.title('Currency and live market price')
root.configure(bg='gold')

t1='1 US$ equal to :'+str(res)
w1 = Label(root, text=t1, bg='blue',fg='white',  font='sans 14')

t2='BSE Market Price :'+str(res2)
w2 = Label(root, text=t2, bg='magenta', fg='white', font='sans 14')

w3 = Label(root, text='Currency and live market price', bg='green', fg='white', font='sans 16')
w3.pack(fill='both')
w1.pack(fill='both')
w2.pack(fill='both')

root.mainloop() 
</pre>
<p>Output of the above program is:</p>
<p><img decoding="async" class="alignnone wp-image-1080" src="http://www.mitindia.in/wp-content/uploads/2020/12/webscarp2-300x59.png" alt="" width="392" height="77" srcset="https://mitindia.in/wp-content/uploads/2020/12/webscarp2-300x59.png 300w, https://mitindia.in/wp-content/uploads/2020/12/webscarp2-768x151.png 768w, https://mitindia.in/wp-content/uploads/2020/12/webscarp2.png 920w" sizes="(max-width: 392px) 100vw, 392px" /></p>
<p>3. Check multiple websites title using web scraping</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">import requests
from bs4 import BeautifulSoup

urls = ["https://www.amazon.in", "http://www.msn.com"]

for url in urls:
    r = requests.get(url)
    soup = BeautifulSoup(r.text, "html.parser")
    print("Title: %s" % soup.title.text)
    
</pre>
<p>Output of the above program is :</p>
<blockquote><p>Title: Online Shopping site in India: Shop Online for Mobiles, Books, Watches, Shoes and More &#8211; Amazon.in<br />
Title: MSN India | Breaking News, Entertainment, Latest Videos, Outlook</p></blockquote>
<p>&nbsp;</p>
<p><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fmitindia.in%2Fdata-science-2-web-scraping%2F&amp;linkname=Data%20Science%20%E2%80%93%202%20%5Bweb%20scraping%5D" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fmitindia.in%2Fdata-science-2-web-scraping%2F&amp;linkname=Data%20Science%20%E2%80%93%202%20%5Bweb%20scraping%5D" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fmitindia.in%2Fdata-science-2-web-scraping%2F&#038;title=Data%20Science%20%E2%80%93%202%20%5Bweb%20scraping%5D" data-a2a-url="https://mitindia.in/data-science-2-web-scraping/" data-a2a-title="Data Science – 2 [web scraping]"><img src="https://static.addtoany.com/buttons/favicon.png" alt="Share"></a></p><p>The post <a href="https://mitindia.in/data-science-2-web-scraping/">Data Science &#8211; 2 [web scraping]</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
