omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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.


    .pdf links from a website

    Editorial
    4
    4
    15436
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jozh
      Jozh last edited by

      Is it possible to build a workflow that pulls all the links to .PDFs off a webpage in the built-in browser.

      1 Reply Last reply Reply Quote 0
      • peterh86
        peterh86 last edited by

        Yes, but i can't help in detail. It probably requires a workflow with just a Python script.

        Given the webpage address, you'd use Requests to get the webpage html, then search for links ending in .pdf and return them in a list. I imagine you could use Requests to download the pdfs as well.

        1 Reply Last reply Reply Quote 0
        • Gerzer
          Gerzer last edited by

          You might be able to pull the HTML directly from the built-in browser, but I’m not 100% sure.

          1 Reply Last reply Reply Quote 0
          • ccc
            ccc last edited by

            See the two links below.... The basic idea is to use requests to get the webpage HTML and use BeautifulSoup to parse that HTML to find the links that end in ".pdf".

            http://omz-forums.appspot.com/pythonista/post/5903606662299648

            http://omz-forums.appspot.com/pythonista/post/5253563362050048

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors