R
Railway8mo ago
x4zx

Using yt-dlp to extract information

As far as I remember before when trying to use yt-dlp in a project - an error immediately appeared at the build stage. I would like to clarify this point now, as yt-dlp doesn't seem to violate the usage rules and it is not in https://railway.app/legal/fair-use. So I'd like to ask if it's possible to use it in projects now, I'll tell you up front - I need it for extracting information from tiktok videos, it will be something like that:
import yt_dlp

def get_tiktok(url):
ydl_opts = {'quiet': True, 'extract_flat': True}
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
info_dict = ydl.extract_info(url, download=False)
print(info_dict)

video_url = 'url to video'
get_tiktok(video_url)
import yt_dlp

def get_tiktok(url):
ydl_opts = {'quiet': True, 'extract_flat': True}
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
info_dict = ydl.extract_info(url, download=False)
print(info_dict)

video_url = 'url to video'
get_tiktok(video_url)
Solution:
well given the fact I don't work for Railway I have no real power here, I am just telling you the facts, you are free to do what you want, just know people have been banned for similar things
Jump to solution
16 Replies
Percy
Percy8mo ago
Project ID: N/A
x4zx
x4zx8mo ago
Also if the use of yt-dlp is still forbidden. Maybe someone knows an alternative solution
Brody
Brody8mo ago
even thought you aren't using it to download videos, it would still count as crawling or scraping, and in this instance, it wouldn't be allowed since your use of yt-dlp could hinder people who are using official APIs
x4zx
x4zx8mo ago
I take it you are referring to the official TikTok API? But how can yt-dlp interfere with them? It turns out that even collecting information on hosting is forbidden - after all, scrapers are often used for this purpose
Brody
Brody8mo ago
you can't, that's why it's not allowed, it doesn't use official APIs
x4zx
x4zx8mo ago
Do you know of any alternatives? It just turns out that all unofficial APIs cannot be used on hosting Scrapers implemented with bs4 I take it are also forbidden?
Brody
Brody8mo ago
does tick-tock have an official api
x4zx
x4zx8mo ago
It's there, it's just hard to access it.
Brody
Brody8mo ago
that doesn't sound very official then
x4zx
x4zx8mo ago
But as for me you have too much faith in the honesty of people, I am sure that on your hosting thousands of projects in which there are scrapers
Brody
Brody8mo ago
there's zero people hosting scrappers on my platform
x4zx
x4zx8mo ago
you can see for yourself https://developers.tiktok.com/doc/display-api-overview/ to get access you have to create your own application, then verify it. Too many unnecessary steps
Brody
Brody8mo ago
that seems totally reasonable
x4zx
x4zx8mo ago
And after all that, you get very limited functionality
Solution
Brody
Brody8mo ago
well given the fact I don't work for Railway I have no real power here, I am just telling you the facts, you are free to do what you want, just know people have been banned for similar things
x4zx
x4zx8mo ago
got it, thank you
Want results from more Discord servers?
Add your server
More Posts
build failing for serviceprojectId : c1e362ab-eed2-49b9-9f6d-da0f8b163b80 service name: backend serviceId : 9d55a3fb-a425-4b4Ktor server uses a lot of memoryMy ktor server uses a lot of memory , I do not know how it should be or I have problems with the codTrying to use sockets with socket.io, works locally but not when deployedIm using node/express for backend with react frontend. I am trying to establish a socket.io connectiHow to use docker image from ghcr.ioI can't seem to be able to import some docker images from ghcr.io into railway. Here's an example: gSetup all branches other than main to deploy to development environmentIs there a way to deploy any branch that's not main to a specified environment, e.g. development? Iffmpeg | ffprobe EACCES error on nodejs production serverIn my express.js server I use ffmpeg for files, on local server everything works fine but on railwayDeploying FFMPEG/ GStreamer based python applications on RailwaysHas anyone deployed applications that use FFMPEG and Gstreamer on Railway? I like to use GStreamer Apperence change in production environmentI have deploy my filament app in railway, and all works fine. But when render page, some style is diservice redeploy causes problems to private networkHey there, I am using a nginx reverse proxy to proxy external requests to internal (non public) servReferenceable ENV Variables for ProjectID, EnvironmentID and ServiceIDAre projectId, environmentID and/or serviceID available as referenceable variables?