Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    Viewing source of sites via fetch block no longer works

    Feedback
    cloud-blocks feedback
    3
    10
    600
    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.
    • jeffreyrb03-gmail
      JaecadeJnight Mod Helper last edited by

      05b4d7c3-bafa-48b0-8944-1004274c767a-image.png
      1f77dea7-808d-4ba0-a8e7-f57142f410af-image.png
      b4cc7601-6e6d-41ce-ab51-6fcba1b05ee7-image.png
      I’m aware that you guys are still working on fixing this block to “show dynamic content” and that makes sense, but could you guys instead introduce a new block for static content so that I can access APIs and stuff? I recently found out there’s a dog API to get information on dog breeds and to get pictures of dogs and I have a key and know which endpoints to use (luckily mostly via GET which is what a fetch does) but I can’t use them in CreatiCode because this still doesn’t work.

      It does work for sites like my website and but fails when it comes into contact with things returned as text or JSON or websites that may have code too complicated like indeed.com when I wanna analyse job hirings and stuff like that. The issue with Indeed may actually be that it’s too dynamic due to it using your location to show jobs near you but that’s not the point.

      The new block to just get (generally static) page and non-page (like text files) data could look like this:
      scratchblocks.png
      and if the indeed.com issue is a concern for you guys, then maybe they both could have extra parameter that specifies extra information to personalize page content:
      60d64f41-fec4-48bd-a18c-39f347a11b26-image.png
      in these parameters, the user agent is that of a Chromebook and the location (lat & long) is London, UK. Maybe user agent might be a stretch but the location would surely be useful for somewhat fixing the issue. It’s also probably not worth fixing if it doesn’t work after that since it might think CreatiCode is a bot (as it is) and might not want it scraping its pages, so we should respect its wishes.

      #LLJW
      <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

      info-creaticode 1 Reply Last reply Reply Quote 0
      • info-creaticode
        CreatiCode @jeffreyrb03-gmail last edited by

        @jeffreyrb03-gmail

        This block currently should already work for simple static sites like

        https://www.google.com/search?q=dog

        We will look into the issue with indeed.com, but most likely it won’t work for such sites that have checks for bots.

        It would also not work for the “view-source” URL, since it expects the input starts with “http”

        jeffreyrb03-gmail 1 Reply Last reply Reply Quote 1
        • jeffreyrb03-gmail
          JaecadeJnight Mod Helper @info-creaticode last edited by

          @info-creaticode Ah ok, but could you also make it support “view-source:” as well at least or just another block that will return the exact code?

          #LLJW
          <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

          info-creaticode 1 Reply Last reply Reply Quote 0
          • info-creaticode
            CreatiCode @jeffreyrb03-gmail last edited by

            @jeffreyrb03-gmail

            We can add an option to return the page content as markdown or html.

            jeffreyrb03-gmail c. 2 Replies Last reply Reply Quote 1
            • jeffreyrb03-gmail
              JaecadeJnight Mod Helper @info-creaticode last edited by

              @info-creaticode Oh that’s a good idea! Thank you!

              #LLJW
              <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

              info-creaticode 1 Reply Last reply Reply Quote 0
              • c.
                Cαƚƚყ Mod Helper @info-creaticode last edited by c.

                This post was removed!

                Reason: I realized that this is NOT what’s going on.

                Official Forums Moderator

                1 Reply Last reply Reply Quote 1
                • info-creaticode
                  CreatiCode @jeffreyrb03-gmail last edited by

                  @jeffreyrb03-gmail

                  This block has been updated:

                  12e058f7-94fc-4a41-bd1d-beee9f1f56e1-image.png

                  jeffreyrb03-gmail 2 Replies Last reply Reply Quote 1
                  • jeffreyrb03-gmail
                    JaecadeJnight Mod Helper @info-creaticode last edited by

                    @info-creaticode thank you

                    #LLJW
                    <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                    1 Reply Last reply Reply Quote 0
                    • jeffreyrb03-gmail
                      JaecadeJnight Mod Helper @info-creaticode last edited by jeffreyrb03-gmail

                      e50ade4b-ac31-45a5-8f43-c90dfc5ab8ec-image.png
                      @info-creaticode it works and it’s great, but could you make it so it returns the full webpage html code instead of just the <body> tag? I also wanna see the <head> tag for getting things like the title of the site and metadata. I’m thinking of now designing my websites so they have special metadata that when used in my CreatiCode web browser, they can have stuff like extra permissions and customizability and whatnot.

                      #LLJW
                      <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                      jeffreyrb03-gmail 1 Reply Last reply Reply Quote 0
                      • jeffreyrb03-gmail
                        JaecadeJnight Mod Helper @jeffreyrb03-gmail last edited by

                        @jeffreyrb03-gmail thank you guys for adding that in I just saw it gives the full code now

                        #LLJW
                        <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post