I'm stuck in getting the direct link of the video file on dailymotion and blip.tv website.
Ex:
direct video url of http: //www.dailymotion.com/video/x96bku_the-forest-short-animation-film_shortfilms is http: //proxy-36.dailymotion.com/video/684/114/15411486%3amp4_h264_aac_hq.mp4?auth=1281348558-2a834e9c8537ef9c8301dcae7c5c565a
http: //blip.tv/file/2765938/ -> http: //a52.video2.blip.tv/7320004900441/BenjaminHershleder-PixarOpeningParody552.flv
These links are captured by IDM
I appreciate any idea that could help me to resolve this problem.
Have you taken a look at Embedly? It allows you to give the url of a resource and receive the embed code for that resource.
While it might not give you the url directly, it will at least give you a structured format (the HTML) which you can then parse to try and get the video file data you need.
Related
I want to get an image by passing a url using JSONP, what is the best way to go about this, can I do this without a library. What library should I use? any tutorials? thanks
Use a Callback Specify a callback URL via the callback=http://??? GET parameter. The URL will be called via a JSONP request and the location of the image passed, the receiving end can then integrate the image into the app. (the callback parameter should be urlencoded)
for cross domain request I suggest this link:
http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/
try to pass the image path, it might work or with jsonp I think the other site should have web method that transforms the image into bytes and return it. You can search about Ajax upload download image to see how things can work for image.
I wanna implement url rewriting so that, for example, all german pages have a url with /de/ after the domain name (and english pages with an /en/) but I don't actually have to create and manage all those subdirectories. I want this "de"/en to persist through out the website
Just like mentioned in the article below:-
http://www.deevelop.com/en/web-design-company/blog/12/Multilingual-website.html
Please check the content under "SUBDIRECTORIES" heading in this article.
This article doesn't explain stuff in detail. Can I please have link to more such examples that are elaborative enough?
Or if someone has implemented such a thing may help. Thanks
URL rewriting is the process of intercepting an incoming Web request and redirecting the request to a different resource. When performing URL rewriting, typically the URL being requested is checked and, based on its value, the request is redirected to a different URL. For example, in the case where a website restructuring caused all of the Web pages in the /people/ directory to be moved to a /info/employees/ directory, you would want to use URL rewriting to check if a Web request was intended for a file in the /people/ directory. If the request was for a file in the /people/ directory, you'd want to automatically redirect the request to the same file, but in the /info/employees/ directory instead.
You first need to download SP1(free) and install it, then follow these links:
http://msdn.microsoft.com/en-us/magazine/2009.01.extremeaspnet.aspx
http://chriscavanagh.wordpress.com/2008/03/11/aspnet-routing-goodbye-url-rewriting/
I am Working in Asp.net 3.5 with c# 2008.I have done authentication part & I'm also able to get all image URLs or videos from my application. I'm also able to send messages to MySpace. Now I would like to post images & videos.
Please let me know how can I post images/videos from my application.
Here is a link to the Documentation on using Media Items API.
http://wiki.developer.myspace.com/index.php?title=OpenSocial_0.9_MediaItems
It explains how to use it.
you need to Issue a POST request on following URL
http://api.myspace.com/1.0/mediaItems/{personId}/{selector}/#videos
if its image then set content-type to image/{type} like content-type="image/jpg" for jpg
these formats are supported: .jpg, .gif, .bmp, .tiff, .png.
similarly for videos use content type like content-type=”video/mpeg”
these formats are supported .avi,.mov,.mpg,.wmv.
For more details please consider checking out above link.
For details on what a POST request is or what is its structure check out this http://www.jmarshall.com/easy/http/
I'm using an API which, given a url, redirects to a file on the server. The file names have "_s,_m and _l" appended to the end (small, medium, large). However, since the url's querystring is parsed dynamically, I don't retrieve the actual file name. The image displays correctly, but is it possible to retrieve the filename of the image file from the code? (i.e. where the url has redirected to)?
e.g. http://api.somesite.com/getimage?small (this is what I enter)
"http://somesite.com/images/userimage_s.png" (this is where it redirects to. I would like to get this address from code)
Thanks for any advice
Sounds to me like you are trying to access some images you shouldn't access programmatically ;-)
You could access the given URL with an HTTP client (opening the stream with a stream reader might already suffice) and watch out for a Location header, which will most likely contain the URL you are searching for.
I want to write a simple utility to upload images to various free image hosting websites like TinyPic or Imageshack via a right-click context menu for the file.
How can I do this using .NET? I've seen some linux scripts that use cURL to post images to these website but I'm not sure how I could create the post request, complete with an image in C#?
Can someone point me in the right direction?
EDIT:
I've found a pretty good resource. Cropper, a free screenshot tool written in .net, has a lot of open-source plugins. One of them is a SendToTinyPic.. complete with source. Link here:
http://www.codeplex.com/cropperplugins
The FlickrNet API makes this extremely easy for working with Flickr from .NET. You have to have a Flickr account as well as an API key and shared secret. Once you have what you need, working with the API is very simple:
// http://www.flickr.com/services/api/misc.api_keys.html
string flickrApiKey = "<api key>";
string flickrApiSharedSecret = "<shared secret>";
string flickrAuthenticationToken = "<authentication token>";
Flickr flickr = new Flickr( flickrApiKey, flickrApiSharedSecret );
flickr.AuthToken = flickrAuthenticationToken;
foreach ( FileInfo image in new FileInfo[] {
new FileInfo( #"C:\image1.jpg" ),
new FileInfo( #"C:\image2.jpg" ) } )
{
string photoId = flickr.UploadPicture(
image.FullName, image.Name, image.Name, "tag1, tag2" );
}
Use HttpWebRequest.
Using this class, you can POST data to a remote HTTP address, just set the mime/type to multi-part/form encoded, and post the binary data from the image with the request.
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(VS.71).aspx
For ImageShack, take a look to this Application.
TinyPic.com doesn't have an API as far as I know, but the Cropper SendToTinyPic Plugin tries to upload using "Screen scraping". The official version of the plugin doesn't work right now, but I put together a patch using the same approach, and submitted it to the cropperplugins project. It's just one source module that changed. Anyone can download the plugins project, and then drop in my patch and it should work.
With the patch, it's PritScrn or Alt-PrntScrn will save the image and upload to tinypic, and stuff the URL of the raw image on your clipboard. All in 2 seconds. easy.
If you don't want the actual tool, you can still look at the source code of my patch to see how to POST a page with form-data and a file upload. No direct link. See http://cropperplugins.codeplex.com/SourceControl/PatchList.aspx and look for #3239.
This example image was produced and then auto-uploaded to tinypic.com with the Alt-PrtScrn key-combo.
To embed it here, I just had to ctrl-V because the URL is stored on the clipboard.