I was writing a process to scrape TikTok and get the OGP information, but before I knew it, it was being rejected with status code 1000, as shown below.
[25] pry(main)> html = open(movie_url) do |f| f.read; end => "{\"statusCode\":10000,\"verifyConfig\":{\"code\":10000,\"type\":\"verify\",\"subtype\":\"slide\",\"fp\":\"verify_5f101e29a0ad54278347a24437cfcb93\",\"region\":\"sg\",\"detail\":\"2SdJGObfW85-lX4dEGohkmh8YbPmZYiXwIh1pqrEUuohsJqr4t3XjgXHtkBHWheNJbj4MB*CVwF1ayKFmhUFcJY2yAgBxyatF0XXzv0*xk*DmEz7Og6oE0nS1mFuZXdkJE*Z05uOnCgTkh4d4yy7xfv6EiiQJGBxdHDxp21vXCZjphcNMaY6YoCrq-5wRulWVle0lP3RJyqJQUFbtIP8pH0LICH8SRGn9a6mItvTEiEwiHCfJHBxhTUf1kFCYkGm1gBpVE1s45qbaNPeVELCCU0732nlU1VLR7Jm16yTIne64NABwJSaXFAl19NrjsfHrV-Cxq*d4kuVUBERzDIIncNGgQ3m6MLdwGLw*H4xfl94O1LId2V5zlOltVL1gYtral9VUYNMskUBWclUpWt2zrUfpbVzuUg.\"}}"
I wondered what to do, but after some research, I found that I could get information equivalent to OGP through TikTok's API, so I modified it to get it through the API. There is documentation, so it's not that difficult.
https://www.tiktok.com/oembed?url=https://www.tiktok.com/@scout2015/video/6718335390845095173
All you have to do is pass the TikTok URL you want to get information about to the url parameter and hit https://www.tiktok.com/oembed . You will get a response like this:
{ "version": "1.0", "type": "video", "title": "Scramble up ur name & Iβll try to guess itπβ€οΈ #foryoupage #petsoftiktok #aesthetic", "author_url": "https://www.tiktok.com/@scout2015", "author_name": "Scout & Suki", "width": "100%", "height": "100%", "html": "<blockquote class=\"tiktok-embed\" cite=\"https://www.tiktok.com/@scout2015/video/6718335390845095173\" data-video-id=\"6718335390845095173\" style=\"max-width: 605px;min-width: 325px;\" > <section> <a target=\"_blank\" title=\"@scout2015\" href=\"https://www.tiktok.com/@scout2015\">@scout2015</a> <p>Scramble up ur name & Iβll try to guess itπβ€οΈ <a title=\"foryoupage\" target=\"_blank\" href=\"https://www.tiktok.com/tag/foryoupage\">#foryoupage</a> <a title=\"petsoftiktok\" target=\"_blank\" href=\"https://www.tiktok.com/tag/petsoftiktok\">#petsoftiktok</a> <a title=\"aesthetic\" target=\"_blank\" href=\"https://www.tiktok.com/tag/aesthetic\">#aesthetic</a></p> <a target=\"_blank\" title=\"β¬ original sound - πππ°ππ’π’π\" href=\"https://www.tiktok.com/music/original-sound-6689804660171082501\">β¬ original sound - πππ°ππ’π’π</a> </section> </blockquote> <script async src=\"https://www.tiktok.com/embed.js\"></script>", "thumbnail_width": 720, "thumbnail_height": 1280, "thumbnail_url": "https://p16.muscdn.com/obj/tos-maliva-p-0068/06kv6rfcesljdjr45ukb0000d844090v0200010605", "provider_url": "https://www.tiktok.com", "provider_name": "TikTok" }
Code (ruby)
uri = URI.parse("https://www.tiktok.com/oembed?url=#{params[:tiktok_url]}") response = Net::HTTP.get_response(uri) res_json = JSON.parse(response.body) html_doc = res_json["html"] title = res_json["title"] ogp_image = res_json["thumbnail_url"]
5 Easy Steps to Download TikTok Videos on Your iPhone:
Step 1: Grab That TikTok Link
β’ Open up TikTok on your iPhone
β’ Find the video you're dying to save
β’ Tap that Share button in the bottom right corner
β’ Hit "Copy Link" and you're golden!
Step 2: Safari Time!
β’ Open Safari on your iPhone
β’ Head over to TiktokSSS.app.
Step 3: Paste and Download
β’ Paste your TikTok link into the search box on TiktokSSS
β’ Tap that Download button
β’ Choose the "Download without logo" option for a clean video
Step 4: Find Your Downloaded Video
β’ Open your Files or Photos app
β’ Check out the Downloads folder or Photos album
β’ Pro tip: Use the search feature in Files or Photos to find your video faster!
Step 5: Share or Edit Your Video
β’ Share directly to Facebook, Instagram, or send it in a message
β’ Want to get creative? Use apps like iMovie, Adobe Premiere Rush, or InShot to edit your video