Anecdote icon indicating copy to clipboard operation
Anecdote copied to clipboard

Se coucher moins bete extra media/text isn't displayed

Open ghost opened this issue 9 years ago • 8 comments

Some quotes have an extra bit of text or media which isn't displayed in the main page of the site but is if you select it (like this one http://secouchermoinsbete.fr/70692-le-canal-du-panama-a-ete-lucratif-pour-les-etats-unis) It would be nice if the app displayed the full text

ghost avatar Dec 07 '16 12:12 ghost

Could be simple, but the app retrieve the page from a list of anecdote and scrap it, it will help me if you find the page that contain this item to I can update the selector. something like http://mobile.secouchermoinsbete.fr/?page=2

HugoGresse avatar Dec 07 '16 12:12 HugoGresse

On the main page there's an icon indicating if there's an extra text or media above each anecdote, and to get it you have to go in the anecdote page (like the link I gave you)

ghost avatar Dec 10 '16 13:12 ghost

it's not very easy from the current app architecture as I am scraping the website from the html page. It should be easy to add if the website was not redirecting to the fullpage on each item.

HugoGresse avatar Dec 13 '16 12:12 HugoGresse

I look it up a bit and every anecdote has a div which class is metadata-list. In this you can find intel about the anecdote and you can know if there's extra stuff in the anecdote page. The 3 classes "metadata image", "metadata video" and "metadata details" are switched on or off according to the situation.

With that you can now if you need to go check in the anecdote page or not.

I put an exemple I found from the main page :

<div class="metadata-list"> <a rel="tooltip" href="#" title="L&#039;anecdote n&#039;a pas d&#039;images" class="metadata image off"></a> <a rel="tooltip" href="#" title="Cette anecdote a une vidéo sur sa fiche" class="metadata video on"></a> <a rel="tooltip" href="#" title="L&#039;anecdote a des compléments sur sa fiche" class="metadata details on"></a> <a href="/70799-new-york-va-avoir-la-plus-grande-roue-au-monde"> <span class="metadata comment on"></span><span class="comment-count">16</span> </a> </div>

ghost avatar Dec 13 '16 17:12 ghost

And in the anecdote page, there's 4 different class that are useful.

The summary contains what's on the main page <p class="summary">En Irlande, la plupart des panneaux routiers indiquant la ville de Londonderry, célèbre pour l&#039;épisode tragique du Bloody Sunday (où 15 manifestants pacifiques furent abattus), ont été taggés à la main afin de masquer la partie London, en guise de protestation contre le comportement des autorités britanniques.</p>

The details contains the extra text <p class="details">Ce n&#039;est qu&#039;en 2010 que le premier ministre David Cameron reconnut la responsabilité du pays et présenta ses excuses.</p>

The sources-image-wrapper contains the link to the image <div id="sources-image-wrapper"> <a href="http://cdn.secouchermoinsbete.fr/medias/images/70654-584130fbd2fe5.jpeg" rel="appendix" class="source image"><img src="http://cdn.secouchermoinsbete.fr/medias/images/70654-584130fbd2fe5.jpeg" /></a> </div>

And the sources-video-wrapper which contains the link to the video <div id="sources-video-wrapper"> <iframe class="ytplayer" type="text/html" width="600" height="390" src="http://www.youtube.com/embed/PK3Aw5cEFog?autoplay=0" frameborder="0"></iframe> </div>

Link for 2 articles which contains the different kind of media http://secouchermoinsbete.fr/70654-tous-les-panneaux-routiers-de-londonderry-sont-barres-a-la-main http://secouchermoinsbete.fr/70799-new-york-va-avoir-la-plus-grande-roue-au-monde

ghost avatar Dec 13 '16 17:12 ghost

you are right, but based on the current architecture, the app would have kind of big change to be able to:

  1. Scrap all items from on pages (already done)
  2. For each items, check the additional data
  3. Retrieve all additional data for each items and updated data list for each one.

In the step 3, one HTTP request should be done for each items, for example 25 request for one page. It could be very expensive. In the meantime it could allow the app to retrieve any additional information for the full page, like getting 9GAG comment for exemple.

HugoGresse avatar Dec 13 '16 21:12 HugoGresse

For secouchermoinsbete there's not that much anecdote with extra feature, like a quarter (from a quick look to the first page ^^).

But it depends if you want to load all extra info (like comments) every time or only certains and make the user select an anectdote to access to the full extra info of this one.

ghost avatar Dec 14 '16 11:12 ghost

loading extra resources when displaying an items in fullscreen or when expended is a great idea. Will probably do it in soon.

HugoGresse avatar Dec 19 '16 13:12 HugoGresse