GithubHelp home page GithubHelp logo

silverbirder / chrome-extensions-tiktok-scraping-downloader Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 4.0 336 KB

This is a Chrome extensions that scrapes and posts Tiktok web pages.

License: MIT License

JavaScript 91.40% HTML 7.72% Dockerfile 0.88%
tiktok scraping chrome-extensions

chrome-extensions-tiktok-scraping-downloader's Introduction

chrome-extensions-tiktok-scraping-downloader

What's this

This is a Chrome extensions that scrapes and posts Tiktok web pages.

Motivation

I'm Tik Tok Lover. TikTok does not provide an official API. Therefore, there are various unofficial TikTok APIs such as:

These APIs are great OSSs that meet my needs. However, if the changes on the TikTok side (especially authentication) occurs, these OSSs will not work well. Thanks to the efforts of the OSS developers, the unofficial API works fine, but it's a cat-and-mouse game.

So, for stability, I came up with a way to scrape TikTok web page from Chrome extensions. That is this repository.

System Structure

One video posted by TikTok is called a TikTok Item. On the TikTok web page, there are two ways to get a TikTok Item.

  • First
    • First render, set TikTok Item on window object.
  • Second and subsequent
    • Due to lazy loading, request to TikTok API to get TikTok Item and render.

To get these TikTok Item from the Chrome extensions, I have the following configuration.

overview

  • First
    • web_accessible_resources.js accesses the window object and gets a TikTok Item.
  • Second and subsequent
    • background.js monitor requests to the TikTok API and get the request URL. Get TikTok Item using URL.

The obtained TikTok Item will be POST from content-script.js to the URL you specify. The data is set in a variable called data.

Usage

  1. Load this repository as a Chrome extensions.
    1. see https://developer.chrome.com/docs/extensions/mv3/getstarted/
  2. Go to the Option page and set your server URL.
    1. Otherwise, it will be http://localhost:3000.
      1. In that case, let's start the local server.
  3. Open the TikTok web page in your Chrome browser.
    1. Tiktok Item will be POSTed to your server!

Notes

Make sure you run it with chrome incognito! This is because it will not work under the influence of other chrome exteions.

Zip

$ zip -r tiktok-scraper-chrome-extension.zip \
  ./chrome-extension-tiktok-downloader/ \
  -x './chrome-extension-tiktok-downloader/server/*' \
  -x './chrome-extension-tiktok-downloader/server_local/*' \
  -x './chrome-extension-tiktok-downloader/web/*' \
  -x './chrome-extension-tiktok-downloader/.git/*' \
  -x './chrome-extension-tiktok-downloader/web/*' \
  -x './chrome-extension-tiktok-downloader/*.md' \
  -x './chrome-extension-tiktok-downloader/.DS_Store' \
  -x './chrome-extension-tiktok-downloader/overview.*' \
  -x './chrome-extension-tiktok-downloader/LICENSE'

chrome-extensions-tiktok-scraping-downloader's People

Contributors

silverbirder avatar

Stargazers

Tong Jin avatar Dandy Raka avatar  avatar  avatar lucas avatar arover avatar ‪Salem Bakkur‬‏ avatar  avatar F̸̖͋̆Ë̸̤́̇N̴̢̢̦̩̜̦͉̟͍̤͋̓͝Ỉ̴̮̳̯̣͎̬͍͓̄̅̆̀̈́͐͗͝Ẍ̴̱̲̖͈͆̈́́̈̓͘ ̴̧̠̮̯̞̺̮̝͒̌̎̆̄̎͂̾͛̕ͅB̴̨̟̼̟̺̯̏ͅI̶̘̜̜̲͓͚̪͌͆͂͘͠ͅN̵̝̬̳̽̿̉̃Ǎ̸̧̨͓̤̪̺̬̰̋̈́̈̏̄̓̽͜Ŗ̵̞̣̻̙̖̥̘̼͑͗̀̃Ì̴͕̻̮̟̣͔̮̓̅͜Ớ̵͙̹̲͇͙̾̃̓̈́̂͌̕͜͠ avatar  avatar Patipol Sittiyanon avatar  avatar Shun Kakinoki avatar octofox1357 avatar Anas Qiblawi avatar javaswing avatar B. Fedaykin avatar tg-z avatar  avatar  avatar HeisenBerg? avatar Ahmad zaky avatar

Watchers

 avatar Kostas Georgiou avatar  avatar

chrome-extensions-tiktok-scraping-downloader's Issues

Extension not retrieving all videos

Only the first videos that are loaded on the page are being sent over to the server. I'm too lazy to troubleshoot anymore because this project isn't active.

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.