Note that there are some explanatory texts on larger screens.

plurals
  1. POHTML What are the ?? characters?
    primarykey
    data
    text
    <p>I am currently trying to write a python script that checks google+ for posts and prints out the contents</p> <p>Here is how i am currently doing it</p> <pre><code>import re from HTMLParser import HTMLParser class MLStripper(HTMLParser): def __init__(self): self.reset() self.fed = [] def handle_data(self, d): self.fed.append(d) def handle_entityref(self, name): self.fed.append('&amp;%s;' % name) def get_data(self): return ''.join(self.fed) def strip_tags(html): s = MLStripper() s.feed(html) return s.get_data() from apiclient.discovery import build service = build("plus", "v1", http = http, developerKey = "APIKEY") activities = service.activities().list(userId = '104898479113219628100', collection = "public").execute() items = activities.get('items') for item in items: content = item['object']['content'] content = content.encode('utf8') content = re.sub('&lt;[^&lt;]+?&gt;', '', content) content = strip_tags(content) </code></pre> <p>The output is as follows</p> <pre><code>???I???m here to thank you for your crazy genius parenting.&amp;quot;+Forbes??was there at the first Take Your Parents to Work Day held at our New York.... .... .... </code></pre> <p>What are the ??? characters? they ruin the output. Am i missing something? im close to what i would like to output which would be</p> <pre><code>I'm here to thank you for your crazy genius parenting. +Forbes was there at the first Take Your Parents to Work Day held at our New York.... </code></pre> <p>im assuming the ??? means "'" and the ?? means " " so i could replace those but should i be doing that?</p> <p>PS: i got the MLStripper class from here so kuddos to the original author!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload