Retrieving comments (disqus) embedded in another web page with python
<p>I'm scrapping a web site using python 3.5 (Beautifulsoup). I can read everything in the source code but I've been trying to retrieve the embedded comments from disqus with no success (which is a reference to a script).</p>

<p>The piece of the html code source looks like this:</p>

<pre><code>var disqus_identifier = "node/XXXXX";
script type='text/javascript' src='https://disqus.com/forums/siteweb/embed.js';
</code></pre>

<p>the src sends to a script function.</p>

<p>I've read the suggestions in stackoverflow, using selenium but I had a really hard time to make it work with no success. I understand that selenium emulates a browser (which I believe is too heavy for what I want). However, I have a problem with the webdrivers, it is not working correctly. So, I dropped this option.</p>

<p>I would like to be able to execute the script and retrieve the .js with the comments.
I found that a possible solution is PyV8. But I can't import in python.
I read the posts in internet, I googled it, but it's not working.</p>

<p>I installed Sublime Text 3 and I downloaded pyv8-win64-p3 manually in: </p>

<p>C:\Users\myusername\AppData\Roaming\Sublime Text 3\Installed Packages\PyV8\pyv8-win64-p3</p>

<p>But I keep getting: </p>

<blockquote>
  <p>ImportError: No module named 'PyV8'.</p>
</blockquote>

<p>If somebody can help me, I'll be very very thankful.</p>

<p>For Facebook embedded comments,you may use Facebook's graph api to extract the comments in json format.</p>

<p>Example-</p>

<p>Facebook comments - <code>https://graph.facebook.com/comments/?ids= "link of page"</code></p>

javascript python web-scraping pyv8