Lemmy.ca
  • Communities
  • Create Post
  • Create Community
  • 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
link
fedilink
1.03K

Chad scraper

sh.itjust.works

dramaticcat@sh.itjust.works to Lemmy Shitpost@lemmy.world · 2 years ago
message-square
96
link
fedilink
alert-triangle
You must log in or register to comment.
  • bill_1992@lemmy.world
    link
    fedilink
    arrow-up
    165
    arrow-down
    2
    ·
    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@kbin.social
      link
      fedilink
      arrow-up
      109
      ·
      2 years ago

      deleted by creator

      • Anonymousllama@lemmy.world
        link
        fedilink
        arrow-up
        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]@midwest.social
        link
        fedilink
        English
        arrow-up
        5
        ·
        2 years ago

        I feel this

    • camr_on@lemmy.world
      link
      fedilink
      arrow-up
      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@lemmy.world
        link
        fedilink
        English
        arrow-up
        41
        ·
        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
          arrow-up
          15
          ·
          2 years ago

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

        • AlecStewart1st@lemmy.world
          link
          fedilink
          arrow-up
          6
          ·
          2 years ago

          This guy scrapes

        • ferret@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          5
          ·
          2 years ago

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

          • Pennomi@lemmy.world
            link
            fedilink
            English
            arrow-up
            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
              arrow-up
              3
              ·
              2 years ago

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

      • Touching_Grass@lemmy.world
        link
        fedilink
        arrow-up
        8
        arrow-down
        1
        ·
        edit-2
        2 years ago

        You guys use IP’s?

        • camr_on@lemmy.world
          link
          fedilink
          arrow-up
          7
          ·
          2 years ago

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

        • synae[he/him]@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          7
          ·
          2 years ago

          Token ring for me baybeee

    • dangblingus@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      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
      arrow-up
      8
      arrow-down
      1
      ·
      2 years ago

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

      • Ann Archy@lemmy.worldBanned from community
        link
        fedilink
        arrow-up
        10
        ·
        2 years ago

        Here take these: \\

        • Matriks404@lemmy.world
          link
          fedilink
          arrow-up
          9
          ·
          2 years ago

          ¯(ツ)/¯\\ Thanks

  • indepndnt@lemmy.world
    link
    fedilink
    arrow-up
    106
    ·
    2 years ago

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

    • 257m@sh.itjust.works
      link
      fedilink
      arrow-up
      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
        arrow-up
        18
        ·
        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
        arrow-up
        4
        ·
        2 years ago

        That was a great read. Thanks!

    • demodawg@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      2 years ago

      This is the way

    • tetelestia@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      What’s wrong with parsing HTML with regex?

      • GuybrushThreepwo0d@programming.dev
        link
        fedilink
        arrow-up
        8
        ·
        2 years ago

        Go and look it up on stack overflow

      • indepndnt@lemmy.world
        link
        fedilink
        arrow-up
        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
    arrow-up
    75
    arrow-down
    2
    ·
    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
      arrow-up
      17
      ·
      2 years ago

      But, but, norobots.txt!

      Chad doesn’t care!

      • PoolloverNathan@programming.dev
        link
        fedilink
        English
        arrow-up
        6
        ·
        2 years ago

        uses curl manually instead

  • SeeMinusMinus@lemmy.world
    link
    fedilink
    English
    arrow-up
    65
    arrow-down
    2
    ·
    2 years ago

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

    • Anonymousllama@lemmy.world
      link
      fedilink
      arrow-up
      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
        arrow-up
        14
        ·
        edit-2
        8 months ago

        deleted by creator

      • SeeMinusMinus@lemmy.world
        link
        fedilink
        English
        arrow-up
        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
      arrow-up
      5
      ·
      2 years ago

      So true that it hurta

  • lnee@lemm.ee
    link
    fedilink
    arrow-up
    38
    arrow-down
    1
    ·
    2 years ago

    I scrape with bash lord help me.

    • OmnislashIsACloudApp@lemmy.world
      link
      fedilink
      arrow-up
      14
      ·
      2 years ago

      there’s literally dozens of us!

      or maybe just 2 idk

    • SubArcticTundra@lemmy.ml
      link
      fedilink
      arrow-up
      14
      ·
      2 years ago

      you scrape WITH BASH?

      • Dkarma@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        Awk all the things!

        • lnee@lemm.ee
          link
          fedilink
          arrow-up
          2
          ·
          2 years ago

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

    • ██████████@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      2 years ago

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

  • darcy@sh.itjust.works
    link
    fedilink
    arrow-up
    30
    ·
    2 years ago

    someone’s never used a good api. like mastodon

  • havokdj@lemmy.world
    link
    fedilink
    arrow-up
    31
    arrow-down
    2
    ·
    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

  • idiosynk@lemmy.world
    link
    fedilink
    English
    arrow-up
    25
    ·
    2 years ago

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

    • XEAL@lemm.ee
      link
      fedilink
      arrow-up
      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
      arrow-up
      2
      ·
      2 years ago

      How so?

      • idiosynk@lemmy.world
        link
        fedilink
        English
        arrow-up
        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
          arrow-up
          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
            arrow-up
            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
              arrow-up
              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.

  • ???@lemmy.worldBanned
    link
    fedilink
    arrow-up
    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

  • sebinspace@lemmy.world
    link
    fedilink
    arrow-up
    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
      arrow-up
      3
      ·
      2 years ago

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

      • sebinspace@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        Oh yeah, that’s much more robust

  • lemmywizard@lemm.ee
    link
    fedilink
    arrow-up
    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
    arrow-up
    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
      arrow-up
      1
      ·
      2 years ago

      Splash ftw

  • Irkam@jlai.lu
    link
    fedilink
    arrow-up
    14
    ·
    2 years ago

    Let me introduce you to WooB (formerly WEBooB).

    • Rodeo
      link
      fedilink
      arrow-up
      24
      ·
      2 years ago

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

      • planish@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        But it’s got boob in it.

  • the_lone_wolf@lemmy.ml
    link
    fedilink
    arrow-up
    16
    arrow-down
    2
    ·
    2 years ago

    Ok then make a spotify scraper

  • Touching_Grass@lemmy.world
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    2 years ago

    Fuck, I think I’ve been doing it wrong and this meme gave me more things to learn than any YouTube video has

    • Rodeo
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      Memes have always been superior to YouTube videos

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: [email protected]

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

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 4.59K users / day
  • 9.15K users / week
  • 16K users / month
  • 32.2K users / 6 months
  • 523 local subscribers
  • 31.4K subscribers
  • 15.4K Posts
  • 352K Comments
  • Modlog
  • mods:
  • Aer@lemmy.world
  • Striker@lemmy.world
  • WiildFiire@lemmy.world
  • Decoy321@lemmy.world
  • Thekingoflorda@lemmy.world
  • YoBuckStopsHere@lemmy.world
  • The Picard Maneuver@startrek.website
  • Flying Squid@lemmy.world
  • The Picard Maneuver@lemmy.world
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org