omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. pllbleu

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 4
    • Best 0
    • Controversial 0
    • Groups 0

    pllbleu

    @pllbleu

    0
    Reputation
    181
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    pllbleu Unfollow Follow

    Latest posts made by pllbleu

    • RE: Get HTML code from URL simply

      The idea in the first place was to send the url of a web page through shortcuts, and have a python program which sent the html code back through the clipboard. However that seems complicated (I'm pretty sure what you're proposing is longer than doing the math exercise on my calculator). I think that I'll juts try to learn some basic js to do it directly on shortcuts.
      Thanks anyway

      posted in Pythonista
      pllbleu
      pllbleu
    • RE: Get HTML code from URL simply

      Okay so I'm currently using this code:

      import requests
      url='http://www.kwyk.fr/accounts/login/'
      login_data=dict(login="username", password="password")
      session = requests.session()
      session.post(url, data=login_data)
      r = session.get("https://www.kwyk.fr/devoirs/419323/?id=23924446")
      print(r2.text)
      

      I checked the html code of the web page and I know that they're called login and password but I don't know what the name of the button is. How would I find it and what would I change in my code?
      Thanks for your help!

      posted in Pythonista
      pllbleu
      pllbleu
    • RE: Get HTML code from URL simply

      Oh yeah, that works thanks! Also is there a way to sign in to the webpage before getting the html (the content is only given if you’re signed in)?

      posted in Pythonista
      pllbleu
      pllbleu
    • Get HTML code from URL simply

      Hi,
      Is there a simple way to get the html code of a web page with a given URL in Pythonista? I tried urllib, using a code from stack overflow, however it didn’t work. Is there another way of doing it?
      Thanks for your answer

      posted in Pythonista
      pllbleu
      pllbleu