Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/siongui/tiktokgo
TikTok in Go
https://github.com/siongui/tiktokgo
go golang tiktok webscraping
Last synced: about 22 hours ago
JSON representation
TikTok in Go
- Host: GitHub
- URL: https://github.com/siongui/tiktokgo
- Owner: siongui
- License: unlicense
- Created: 2021-02-22T20:45:53.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-11T15:56:12.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T22:32:22.923Z (8 months ago)
- Topics: go, golang, tiktok, webscraping
- Language: Go
- Homepage:
- Size: 35.2 KB
- Stars: 13
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
========
tiktokgo
========.. image:: https://img.shields.io/badge/Language-Go-blue.svg
:target: https://golang.org/.. image:: https://godoc.org/github.com/siongui/tiktokgo?status.svg
:target: https://godoc.org/github.com/siongui/tiktokgo.. image:: https://github.com/siongui/tiktokgo/workflows/Test%20Package/badge.svg
:target: https://github.com/siongui/tiktokgo/blob/master/.github/workflows/build.yml.. image:: https://goreportcard.com/badge/github.com/siongui/tiktokgo
:target: https://goreportcard.com/report/github.com/siongui/tiktokgo.. image:: https://img.shields.io/badge/license-Unlicense-blue.svg
:target: https://raw.githubusercontent.com/siongui/tiktokgo/master/UNLICENSE**tiktokgo** downloads user avatar photo and videos.
Currently this package can
- download user avatar photos and latest 5 video items (with watermark) without
login if the user account is not private.
- download video item (with watermark) by the item URL.Visit `example `_ directory for examples.
Tested on:
- `Ubuntu 20.10`_
- `Go 1.16`_Important Tricks
++++++++++++++++According to README in `drawrowfly/tiktok-scraper`_, the video play/download
address is binded to the **tt_webid_v2** cookie value. To download the video
successfully, the same headers/cookies must be used both when access API or
metadata and when access/download videos.
The following three are necessary part (values copied from README in
`drawrowfly/tiktok-scraper`_ for illustration purpose):.. code-block:: txt
headers: {
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36",
"referer": "https://www.tiktok.com/",
"cookie": "tt_webid_v2=689854141086886123"
},UNLICENSE
+++++++++Released in public domain. See UNLICENSE_.
References
++++++++++.. [1] | `github tiktok - Google search `_
| `github tiktok - DuckDuckGo search `_
| `github tiktok - Ecosia search `_
| `github tiktok - Qwant search `_
| `github tiktok - Bing search `_
| `github tiktok - Yahoo search `_
| `github tiktok - Baidu search `_
| `github tiktok - Yandex search `_.. _Go: https://golang.org/
.. _Ubuntu 20.10: https://releases.ubuntu.com/20.10/
.. _Go 1.16: https://golang.org/dl/
.. _UNLICENSE: https://unlicense.org/
.. _drawrowfly/tiktok-scraper: https://github.com/drawrowfly/tiktok-scraper