dormi.zone
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@dramaticcat@sh.itjust.works to Lemmy Shitpost@lemmy.world • 2 years ago

Chad scraper

sh.itjust.works

message-square
96
fedilink
1.05K

Chad scraper

sh.itjust.works

@dramaticcat@sh.itjust.works to Lemmy Shitpost@lemmy.world • 2 years ago
message-square
96
fedilink
alert-triangle
You must log in or register to comment.
  • @bill_1992@lemmy.world
    link
    fedilink
    164•2 years ago

    Everyone loves the idea of scraping, no one likes maintaining scrapers that break once a week because the CSS or HTML changed.

    • DigitalPaperTrail
      link
      fedilink
      107•2 years ago

      deleted by creator

      • @Anonymousllama@lemmy.world
        link
        fedilink
        22•2 years ago

        This one. One of the best motivators. Sense of satisfaction when you get it working and you feel unstoppable (until the next subtle changes happens anyway)

      • archomrade [he/him]
        link
        fedilink
        English
        5•2 years ago

        I feel this

    • @camr_on@lemmy.world
      link
      fedilink
      28•2 years ago

      I loved scraping until my ip was blocked for botting lol. I know there’s ways around it it’s just work though

      • Pennomi
        link
        fedilink
        English
        42•2 years ago

        I successfully scraped millions of Amazon product listings simply by routing through TOR and cycling the exit node every 10 seconds.

        • @camr_on@lemmy.world
          link
          fedilink
          15•2 years ago

          That’s a good idea right there, I like that

        • @AlecStewart1st@lemmy.world
          link
          fedilink
          6•2 years ago

          This guy scrapes

        • ferret
          link
          fedilink
          English
          5•2 years ago

          lmao, yeah, get all the exit nodes banned from amazon.

          • Pennomi
            link
            fedilink
            English
            12•2 years ago

            That’s the neat thing, it wouldn’t because traffic only spikes for 10s on any particular node. It perfectly blends into the background noise.

            • @nilloc@discuss.tchncs.de
              link
              fedilink
              English
              3•2 years ago

              Queue Office Space style error and scrape for 10 hours on each node.

      • @Touching_Grass@lemmy.world
        link
        fedilink
        8•
        edit-2
        2 years ago

        You guys use IP’s?

        • synae[he/him]
          link
          fedilink
          English
          7•2 years ago

          Token ring for me baybeee

        • @camr_on@lemmy.world
          link
          fedilink
          7•2 years ago

          I’m coding baby’s first bot over here lol, I could probably do better

    • @dangblingus@lemmy.world
      link
      fedilink
      10•2 years ago

      Or in the case of wikipedia, every table on successive pages for sequential data is formatted differently.

    • @Matriks404@lemmy.world
      link
      fedilink
      8•2 years ago

      Just use AI to make changes ¯_(ツ)_/¯

      • Ann Archy
        link
        fedilink
        10•2 years ago

        Here take these: \\

        • @Matriks404@lemmy.world
          link
          fedilink
          9•2 years ago

          ¯_(ツ)_/¯\\ Thanks

  • @indepndnt@lemmy.world
    link
    fedilink
    108•2 years ago

    I’m down with scraping, but “parses HTML with regex” has got me fucked up.

    • @257m@sh.itjust.works
      link
      fedilink
      61•2 years ago

      Relevant SO post. https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags#1732454

      • @ChickenLadyLovesLife@lemmy.world
        link
        fedilink
        English
        17•2 years ago

        13 years ago my god. I wonder what Jon Skeet is doing these days.

        I remember when he passed me in the reputation ranking back in the early days and thinking that I needed to be a little bit more active on the site to catch him lol.

      • @DAMunzy@lemmy.dbzer0.com
        link
        fedilink
        4•2 years ago

        That was a great read. Thanks!

    • @demodawg@lemmy.world
      link
      fedilink
      5•2 years ago

      This is the way

    • @tetelestia@lemmy.world
      link
      fedilink
      2•2 years ago

      What’s wrong with parsing HTML with regex?

      • @GuybrushThreepwo0d@programming.dev
        link
        fedilink
        8•2 years ago

        Go and look it up on stack overflow

      • @indepndnt@lemmy.world
        link
        fedilink
        5•2 years ago

        In short, it’s the wrong tool for the job.

        In practice, if your target is very limited and consistent, it’s probably fine. But as a general statement about someone’s behavior, it really sounds like someone is wasting a lot of time and regularly getting sub-par results.

  • @ViscloReader@lemmy.world
    link
    fedilink
    73•2 years ago

    Just a heads up for companies thinking it’s wrong to scrap: if you don’t want info to be scraped, don’t put it on the internet.

    • @DAMunzy@lemmy.dbzer0.com
      link
      fedilink
      16•2 years ago

      But, but, norobots.txt!

      Chad doesn’t care!

      • @PoolloverNathan@programming.dev
        link
        fedilink
        English
        6•2 years ago

        uses curl manually instead

  • @SeeMinusMinus@lemmy.world
    link
    fedilink
    English
    64•2 years ago

    The sad part is that scrapping is often easier then using the api.

    • @Anonymousllama@lemmy.world
      link
      fedilink
      21•2 years ago

      Much less beholden to arbitrary rules also. Way too many times companies will just up and lift their API access or push through restrictions. No ty, I’ll just access it myself then

      • @AeroLemming@lemm.ee
        link
        fedilink
        English
        14•
        edit-2
        9 months ago

        deleted by creator

      • @SeeMinusMinus@lemmy.world
        link
        fedilink
        English
        7•2 years ago

        API starter kit

        • Outdated and unsupported and hasn’t been replaced yet but is the standard way to use the service.
        • Lots of authorization tokens.
        • The example in the docs doesn’t work (if there is one).
        • You have no idea where the online tutorial got the information because it doesn’t have links to resources and the docs have barely anything even though its giant.
        • Uses asynchronous programming to make it faster but its still much much slower then scrapping without asynchronous programming.
    • @clbustos@lemmy.world
      link
      fedilink
      5•2 years ago

      So true that it hurta

  • lnee
    link
    fedilink
    37•2 years ago

    I scrape with bash lord help me.

    • @OmnislashIsACloudApp@lemmy.world
      link
      fedilink
      14•2 years ago

      there’s literally dozens of us!

      or maybe just 2 idk

    • @SubArcticTundra@lemmy.ml
      link
      fedilink
      14•2 years ago

      you scrape WITH BASH?

      • @Dkarma@lemmy.world
        link
        fedilink
        2•2 years ago

        Awk all the things!

        • lnee
          link
          fedilink
          2•2 years ago

          pipe sed pipe grep pipe tr pipe grep… I would say I am a bit of a plumber

    • ██████████
      link
      fedilink
      3•2 years ago

      as a windows user i say kindly on our behalf thank you for pushing the envelope ✉

  • @havokdj@lemmy.world
    link
    fedilink
    32•2 years ago

    Hold on, I thought it was supposed to be realism on the virgin’s behalf and ridiculous nonsense on the chad behalf:

    All I see is realism on both sides lol

  • darcy
    link
    fedilink
    30•2 years ago

    someone’s never used a good api. like mastodon

  • @idiosynk@lemmy.world
    link
    fedilink
    English
    25•2 years ago

    I’ve just discovered selenium and my life has changed.

    • @XEAL@lemm.ee
      link
      fedilink
      9•2 years ago

      I created a shitty script (with ChatGPT’s help) that uses Selenium and can dump a Confluence page from work, all its subpages and all linked Google Drive documents.

    • @Wakmrow@lemmy.world
      link
      fedilink
      2•2 years ago

      How so?

      • @idiosynk@lemmy.world
        link
        fedilink
        English
        10•2 years ago

        When a customer needs a part replaced, they send in shipping data. This data has to be entered into 3-4 different web forms and an email. This allows me to automate it all from a single form that has built in error checking so human mistakes are limited.

        Company could probably automate this all in the backend but they won’t :shrug:

        • @Lemmesee@lemm.ee
          link
          fedilink
          4•2 years ago

          Using Selenium for this is probably overkill. You might be better off sending direct HTTP requests with your form data. This way you don’t actually have to spin up an entire browser to perform that simple operation for you.

          That said, if it works - it works!

          • @kattenluik@feddit.nl
            link
            fedilink
            2•2 years ago

            I’m guessing forms like this have CSRF protection, so you’d probably have to obtain that token and hope they don’t make a new one on every request.

            • @Lemmesee@lemm.ee
              link
              fedilink
              2•2 years ago

              Good point. This is also possible to overcome with one additional HTTP request and some HTML parsing. Still less overhead than running Selenium! In any event, I was replying in a general sense: Selenium is easy to understand and seems like an intuitive solution to a simple problem. In 99% of cases some additional effort will result in a more efficient solution.

  • sebinspace
    link
    fedilink
    21•2 years ago

    I wanted to build a Discord bot that would check NIST for new CVEs every 24 hours. But their API leaves quiiiiiiite a bit to be desired.

    Their pages, however…

    • @khaffner@lemmy.world
      link
      fedilink
      3•2 years ago

      Just use this https://github.com/CVEProject/cvelistV5/tree/main/cves

      • sebinspace
        link
        fedilink
        2•2 years ago

        Oh yeah, that’s much more robust

  • ???
    link
    fedilink
    21•
    edit-2
    2 years ago

    I used Twitter Scraper to get twitter data for my thesis. Shortly after, it became obsolete.

    https://github.com/taspinar/twitterscraper/issues/368 rip twitter scraper

  • @lemmywizard@lemm.ee
    link
    fedilink
    20•2 years ago

    It’s all fun and games until you have to support all this shit and it breaks weekly!

    That being said, I do miss the simplicity of maintaining selenium projects for work

  • @McBain@feddit.ch
    link
    fedilink
    18•2 years ago

    I use scrapy. It has a steeper learning curve than other libraries, but it’s totally worth it.

    • @rishado@lemmy.world
      link
      fedilink
      1•2 years ago

      Splash ftw

  • @the_lone_wolf@lemmy.ml
    link
    fedilink
    16•2 years ago

    Ok then make a spotify scraper

  • @Irkam@jlai.lu
    link
    fedilink
    14•2 years ago

    Let me introduce you to WooB (formerly WEBooB).

    • @Rodeo@lemmy.ca
      link
      fedilink
      24•2 years ago

      Why on earth would they have changed that. WEBooB is a way better name.

      • @planish@sh.itjust.works
        link
        fedilink
        3•2 years ago

        But it’s got boob in it.

  • @ArchTemperedKoala@lemmy.world
    link
    fedilink
    13•2 years ago

    I have totally no idea what these are about…

    • @Touching_Grass@lemmy.world
      link
      fedilink
      45•2 years ago

      Websites and services create APIs for programmers to use them. So Spotify has code that let’s you build a program that can use its features. But you need a token they give you after you sign up. The token can be revoked and used to monitor how much of their service you’re using. That way they can restrict if its too much.

      Scraping is raw dogging the web slut you met at the cougar ranch who went home with you because you reminded her of her dog

      • @blackluster117@possumpat.io
        link
        fedilink
        14•2 years ago

        This is the greatest definition for scraping I’ve ever read. You should have it bronzed.

      • Ann Archy
        link
        fedilink
        4•2 years ago

        Put like that I want to learn everything about it.

    • @DarkSpectrum@lemmy.world
      link
      fedilink
      14•
      edit-2
      2 years ago

      ‘Scraping’ is the process of anonymously and programmatically collecting data from a webpage(s), often without the website’s permission and only limited to the content made publicly available. This is in contrast to using an API provided by the database owner which is limited by tokens, access volume, available end points etc.

    • undetermined
      link
      fedilink
      10•2 years ago

      deleted by creator

    • @SternburgExport@feddit.de
      link
      fedilink
      4•2 years ago

      Everytime I think I’m good with tech, something like this shows up in my feed and makes me realize I know jackshit.

Lemmy Shitpost@lemmy.world

!lemmyshitpost@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !lemmyshitpost@lemmy.world

Welcome to Lemmy Shitpost. Here you can shitpost to your hearts content.

Anything and everything goes. Memes, Jokes, Vents and Banter. Though we still have to comply with lemmy.world instance rules. So behave!


Rules:

1. Be Respectful

Refrain from using harmful language pertaining to a protected characteristic: e.g. race, gender, sexuality, disability or religion.

Refrain from being argumentative when responding or commenting to posts/replies. Personal attacks are not welcome here.

…


2. No Illegal Content

Content that violates the law. Any post/comment found to be in breach of common law will be removed and given to the authorities if required.

That means:

-No promoting violence/threats against any individuals

-No CSA content or Revenge Porn

-No sharing private/personal information (Doxxing)

…


3. No Spam

Posting the same post, no matter the intent is against the rules.

-If you have posted content, please refrain from re-posting said content within this community.

-Do not spam posts with intent to harass, annoy, bully, advertise, scam or harm this community.

-No posting Scams/Advertisements/Phishing Links/IP Grabbers

-No Bots, Bots will be banned from the community.

…


4. No Porn/Explicit

Content


-Do not post explicit content. Lemmy.World is not the instance for NSFW content.

-Do not post Gore or Shock Content.

…


5. No Enciting Harassment,

Brigading, Doxxing or Witch Hunts


-Do not Brigade other Communities

-No calls to action against other communities/users within Lemmy or outside of Lemmy.

-No Witch Hunts against users/communities.

-No content that harasses members within or outside of the community.

…


6. NSFW should be behind NSFW tags.

-Content that is NSFW should be behind NSFW tags.

-Content that might be distressing should be kept behind NSFW tags.

…

If you see content that is a breach of the rules, please flag and report the comment and a moderator will take action where they can.


Also check out:

Partnered Communities:

1.Memes

2.Lemmy Review

3.Mildly Infuriating

4.Lemmy Be Wholesome

5.No Stupid Questions

6.You Should Know

7.Comedy Heaven

8.Credible Defense

9.Ten Forward

10.LinuxMemes (Linux themed memes)


Reach out to

All communities included on the sidebar are to be made in compliance with the instance rules. Striker

  • 4.38K users / day
  • 9.65K users / week
  • 15.4K users / month
  • 30.5K users / 6 months
  • 31.6K subscribers
  • 15.2K Posts
  • 348K Comments
  • Modlog
  • mods:
  • Aer
  • Striker
  • @WiildFiire@lemmy.world
  • Decoy321
  • @Thekingoflorda@lemmy.world
  • @YoBuckStopsHere@lemmy.world
  • The Picard Maneuver
  • Flying Squid
  • The Picard Maneuver
  • BE: 0.19.3
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org