Git Product home page Git Product logo

social-discord's Introduction

Social-Discord

A single file java service that scraps Facebook posts and mirrors them to Discord using webhooks... that's it. It was in "production" for a couple of years until FB started banning bots, after that I took it down permanently.

Features

Supports:

  • Text posts.
  • Posts with a single image.
  • Album posts.
  • Translation using Google.

Everything is properly packed inside an embed. Auto splits into fields if source text is longer.

Example and how it works

image

It works by scraping the JS-less mobile FB page. It will list all the posts, scrap and check the id, then decode the text content and check for any extra images. For each image it will open their page and scrap the HQ link for use in the embeds. After that it will cleanup the text and make it Discord compatible. Finally put everything together into a hand-made JSON text.

The colored strip is randomized to differentiate between messages.

In its original configuration it would check every 5 minutes but after FB started blocking scrappers I had to add more checks and increase the wait time to at least 30 minutes.

Configuration is stored like this:

  • /config/
  • /config/hooks.json JSON array with all target hook urls.
  • /config/page.txt Single line with the page name.
  • /config/report.txt Single line hook url to which it would send a message when it gets banned.

/ Is the work directory.

History

I originally wrote this service to mirror Honkai Impact 3rd's Facebook feed into our armada Discord.

It was originally called fb-discord but then decided that it would be a good idea to add more sources, Twitter for example, I changed the name to the current one but that never ended up happening.

Code quality is bad, this is me being as lazy as possible while getting away with it.

I'm only making it public for archival purposes. If FB's original JS-less page is still up it should work as-is tho I have not tested it since then.

social-discord's People

Contributors

guerra24 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

nakamotojp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.