Comments (3)
I fear that there is no direct way to find out the URL.
Though, you can set up a poll for that as follows:
Assuming $posting_init_on
initialized to the DateTime of the time when we posted the video and $source_url
to the source URL for the post.
$remote_url = null;
$attempts = 0;
$found = false;
do {
$info = $client->getBlogPosts($blogName, ['type' => 'video', 'limit' => 1]);
if (!empty($info) && !empty($info->posts) && !empty($info->posts[0])) {
if ($info->posts[0]->timestamp >= $posting_init_on->timestamp) {
$url = $info->posts[0]->source_url;
$parsed_source_url = parse_url($url);
$query = $parsed_source_url['query'];
if (!empty($query)) {
parse_str($query, $parsed_query);
if (!empty($parsed_query) && $parsed_query['z'] == $source_url) {
$remote_url = $info->posts[0]->post_url;
$found = true;
}
}
}
}
$attempts++;
sleep(($attempts + 1) * 5);
} while ($attempts < 15 && $found === false);
from tumblr.php.
https://xxxxxx.tumblr.com/post/174874832676 Is the correct url, however video transcoding takes a few minutes to a few hours depending upon the size of the video and how many other videos are being processed at the same time. Your best bet is to periodically check if the video url returns a non 404.
from tumblr.php.
@oligriffiths, the id returned in the transcoding response is just to reference transcoding process, it never matches with the final post id.
So https://xxxxxx.tumblr.com/post/174874832676 is wrong URL for the final post.
from tumblr.php.
Related Issues (20)
- Response to a Submission HOT 1
- followed
- Tumblr oauth not working in Laravel 6.5.2
- Encountere a error during handling Response in PHP HOT 1
- Encountered an Exception handling HOT 1
- How to check if a post is reblogged ?
- Is this package deprecated? HOT 6
- Is there a version of this package that supports NPF(Neue Post Format)?
- Missing or invalid request token. HOT 1
- Neue Post HOT 5
- compatibility issue with php8.2 HOT 1
- Bad request code 8009
- Bad Request (You may only upload one video per post.) HOT 1
- RATE LIMITING HEADERS HOT 1
- Rate limit exceeded HOT 1
- Reblog post Unauthorized ? HOT 1
- oauth 403 error ? HOT 2
- some blogs returns 404 HOT 11
- get list of users who liked post
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tumblr.php.