<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using Python to scrape points from a google map embedded on a website in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-python-to-scrape-points-from-a-google-map/m-p/354582#M27896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use the requests library + beautiful soup to pull information on the antenna points from the map shown on this website.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.sites.bipt.be/" title="http://www.sites.bipt.be/" rel="nofollow noopener noreferrer" target="_blank"&gt;BIPT: Sitebeheer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My original plan was to&amp;nbsp;iterate through site numbers, pull out the lat/long information that appears on the left hand panel when a point is clicked, and display that data in Arc. So far I have accessed the &amp;lt;div&amp;gt; element where that information is located when the point is clicked (&amp;lt;div&amp;gt; id = selectedsite ... &amp;lt;/div&amp;gt;). But the element turns up empty in python seemingly because nothing is clicked?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my first time web scraping and I have limited HTML knowlege, if there is another approach that would be better or any pointers you could offer that would be greatly appreciated &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; requests
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; bs4 &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; BeautifulSoup

&lt;SPAN class="comment token"&gt;#api_key = 'AIzaSyAv5Ru8AQCc9ZvfcrdYEg9SGHyDZqv55T0'&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#Prettify HTML&lt;/SPAN&gt;
source &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; requests&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"http://www.sites.bipt.be/"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;text
soup &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; BeautifulSoup&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;source&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'lxml'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;soup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;prettify&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;# Class where information on the selected site is located - turns up empty&lt;/SPAN&gt;
div &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; soup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;find&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;id&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'selectedsite'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;div&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;prettify&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 16:37:49 GMT</pubDate>
    <dc:creator>AliWertheim1</dc:creator>
    <dc:date>2021-12-11T16:37:49Z</dc:date>
    <item>
      <title>Using Python to scrape points from a google map embedded on a website</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-scrape-points-from-a-google-map/m-p/354582#M27896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use the requests library + beautiful soup to pull information on the antenna points from the map shown on this website.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.sites.bipt.be/" title="http://www.sites.bipt.be/" rel="nofollow noopener noreferrer" target="_blank"&gt;BIPT: Sitebeheer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My original plan was to&amp;nbsp;iterate through site numbers, pull out the lat/long information that appears on the left hand panel when a point is clicked, and display that data in Arc. So far I have accessed the &amp;lt;div&amp;gt; element where that information is located when the point is clicked (&amp;lt;div&amp;gt; id = selectedsite ... &amp;lt;/div&amp;gt;). But the element turns up empty in python seemingly because nothing is clicked?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my first time web scraping and I have limited HTML knowlege, if there is another approach that would be better or any pointers you could offer that would be greatly appreciated &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; requests
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; bs4 &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; BeautifulSoup

&lt;SPAN class="comment token"&gt;#api_key = 'AIzaSyAv5Ru8AQCc9ZvfcrdYEg9SGHyDZqv55T0'&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#Prettify HTML&lt;/SPAN&gt;
source &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; requests&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"http://www.sites.bipt.be/"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;text
soup &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; BeautifulSoup&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;source&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'lxml'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;soup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;prettify&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;# Class where information on the selected site is located - turns up empty&lt;/SPAN&gt;
div &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; soup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;find&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;id&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'selectedsite'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;div&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;prettify&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:37:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-scrape-points-from-a-google-map/m-p/354582#M27896</guid>
      <dc:creator>AliWertheim1</dc:creator>
      <dc:date>2021-12-11T16:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using Python to scrape points from a google map embedded on a website</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-scrape-points-from-a-google-map/m-p/354583#M27897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are any esri products involved in the process? or is this a pure python question?&lt;/P&gt;&lt;P&gt;If the latter...&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://stackoverflow.com/" title="https://stackoverflow.com/"&gt;Stack Overflow - Where Developers Learn, Share, &amp;amp; Build Careers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;might be a better venue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2020 14:40:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-scrape-points-from-a-google-map/m-p/354583#M27897</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-01-15T14:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using Python to scrape points from a google map embedded on a website</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-scrape-points-from-a-google-map/m-p/354584#M27898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this advice - I have cross posted on stack overflow as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2020 14:58:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-scrape-points-from-a-google-map/m-p/354584#M27898</guid>
      <dc:creator>AliWertheim1</dc:creator>
      <dc:date>2020-01-15T14:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using Python to scrape points from a google map embedded on a website</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-scrape-points-from-a-google-map/m-p/354585#M27899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can see a link to download a spreadsheet which exposes coordinates:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.sites.bipt.be/lijst-liste.xlsx" title="http://www.sites.bipt.be/lijst-liste.xlsx"&gt;http://www.sites.bipt.be/lijst-liste.xlsx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I simplified it (attached, using Data Interoperability extension).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Convert Coordinate Notation tool can expose lat/long better:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/478449_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2020 15:34:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-scrape-points-from-a-google-map/m-p/354585#M27899</guid>
      <dc:creator>BruceHarold</dc:creator>
      <dc:date>2020-01-15T15:34:22Z</dc:date>
    </item>
  </channel>
</rss>

