this post was submitted on 04 Oct 2023
2 points (100.0% liked)

Lemmy Shitpost

30722 readers
3334 users here now

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/ExplicitContent


-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

founded 2 years ago
MODERATORS
 
top 11 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 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.

[–] [email protected] 1 points 2 years ago

someone's never used a good api. like mastodon

[–] [email protected] 0 points 2 years ago (1 children)

Sorry, I'm ignorant in this matter. Why exactly would you want to scrape websites aside from collecting data for ML? What kind of irreplaceable API are you using? Someone please educate me here.

[–] [email protected] 0 points 2 years ago (1 children)

API might cost a lot of money for the amount of requests you want to send. API may not include some fields in the data you want. API is rate limited, scraping might not be. API requires agreement to usage terms, scraping does not (though the recent LinkedIn scraping case might weaken that argument.)

[–] [email protected] 0 points 2 years ago (1 children)

This kinda reminds me of pirating vs paying. Using api = you know it will always be the same structure and you will get the data you asked for. Otherwise you will be notified unless they version their api. There is usual good documentation. You can always ask for help.

Scraping = you need to scout the whole website yourself. you need to keep up to date with the the websites structure and to make sure they haven't added ways to block bots (scraping). Error handling is a lot more intense on your end, like missing content, hidden content, query for data. the website may not follow the same standards/structuree throughout the website so you need to have checks for when to use x to get y. The data may need multiple request because they do not show for example all the user settings on one page but in an api call they would or it is a ajax page and you need to run Javascript scripts and click on buttons that may change id, class or text info and they may load data when you do x with Javascript so you need to emulate the webpage.

So my guess is that scraping is used most often when you only need to fetch simple data structures and you are fine with cleaning up the data afterwards. Like all the text/images on a page, checking if a page has been updated or just save the whole page like wayback machine.

[–] [email protected] 1 points 2 years ago

As someone who used to scrape government websites for a living (with permission from them cause they'd rather us break their single 100yr old server than give us a csv), I can confirm that maintaining scraping scripts is a huge pain in the ass.

[–] [email protected] 0 points 2 years ago (1 children)

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

[–] [email protected] 0 points 2 years ago (1 children)

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

[–] [email protected] 1 points 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.
[–] [email protected] 0 points 2 years ago (1 children)

I have totally no idea what these are about..

[–] [email protected] 1 points 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