1

I've write a python script to submit a form, and when i try it, it doesn't work..

So I wanted to look at the current page in robobrowser, and i found this:

<div id="content">
<div class="SurveyHolder" id="BlockPage"><!-- Modules -->
<div id="jsrequired">
<p>Pour répondre à ce sondage, JavaScript doit être activé sur votre navigateur.  Dès que vous aurez activé JavaScript, vous pourrez répondre aux questions ; vous devrez néanmoins relancer le sondage.   Nous vous prions de nous excuser pour les désagréments occasionnés.</p>
<p>Vous trouverez toutes les instructions relatives à l'activation de JavaScript sur toutes les versions d'Internet Explorer, Mozilla FireFox 3.X, Opera et Netscape sur <a
href="http://support.microsoft.com/gp/howtoscript">http://support.microsoft.com/gp/howtoscript</a>.</p>
    <ul>
    <li>Activation de JavaScript dans Safari 4.0
                                                        <ul>
    <li>Cliquez sur « Modifier » dans la barre de menu puis choisissez « Préférences ».</li>
<li>Dans la boîte de dialogue qui apparaît, cliquez sur « Sécurité » dans la barre de menu située en haut.</li>
<li>En haut de la section Sécurité, dans la rubrique de Contenu Web, cochez la case « Activer JavaScript ».</li>
<li>Fermez la boîte de dialogue et toutes les fenêtres du navigateur, puis reprenez le sondage.</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="pusher" id="contenttrailer"> </div>
</div>

It's in French but, basically, it requires to activate javascript ...

I tried to find a way to activate javascript in robobrowser, but i don't found any solution...

So.. that is my question: Is there a way to do this ?

Thanks for help.

ecavard
  • 151
  • 2
  • 10
  • You need a headless browser. – SLaks Jun 01 '18 at 00:10
  • Hi @SLaks, i've searched on google, and it's seems than robobrowser are a headless browser, or i've don't understand what i've read (and it's possible ^^) I've read this https://github.com/dhamaniasad/HeadlessBrowsers – ecavard Jun 01 '18 at 00:17
  • You need a real browser, not a fake one (the first sections in that page). – SLaks Jun 01 '18 at 00:21
  • Thanks @SLaks, I've imported selenium and i'm actually trying to get webdriver of one of headless browser on the github page. – ecavard Jun 01 '18 at 00:39
  • I've used PhantomJS and it seems to work.. Thanks ;) – ecavard Jun 01 '18 at 01:05

1 Answers1

0
  • You need a headless browser. – SLaks

  • Hi @SLaks, i've searched on google, and it's seems than robobrowser are a headless browser, or i've don't understand what i've read (and it's possible ^^) I've read this github.com/dhamaniasad/HeadlessBrowsers – ecavard

  • You need a real browser, not a fake one (the first sections in that page). – SLaks

  • Thanks @SLaks, I've imported selenium and i'm actually trying to get webdriver of one of headless browser on the github page. – ecavard

  • I've used PhantomJS and it seems to work.. Thanks ;) – ecavard

ecavard
  • 151
  • 2
  • 10