Pulling String from Pandora and sending it to Youtube in JavaScript - javascript

My project is when Pandora is open and playing, be able to punch a button (either on the page or as an add-on in Firefox. This button would then activate a script that would pull the song and artist name from the page and store them in variables. Then these strings would be put through a Youtube search. The URL of the first video will then be stored in another variable. A website that strips the mp3 from the video will be opened and the Youtube URL will be deposited in the appropriate field. Ideally the converted file will then be downloaded.
I don't know much Javascript but the point of this project is to help me learn. I haven't gotten very far at all and need some help. I know the divs where the song string is on the page but can't seem to store it. I'm using GreaseMonkey to run the script.
One suggestion was to use Java and make it a desktop application and have it listen to system volume and send it to a Shazam-like website and go from there but there are no non-mobile Shazam apps that would apply to this.
What I need help with:
Is JS the right language to use for this task?
If so:
How do I store the song info into variables. I've researched it and anything I put into the script involving a variable causes it to not run.
Thanks in advance.

Related

URL manipulation/redirection of an NFC Tag after submitting sessions

after some research i literally go out of my capacities to find something useful.
I have following problem:
NFC Cards are not able to be overwritten via IOS Browser, only with an IOS Native App. But i try to make my product working only via browser. So my idea is to manipulate the link that is saved on the NFC.
My theory
I have thought to manipulate the initial Link of the NFC like in the following example:
After scanning the NFC it will open following NFC Link
https://example.com/NFC-ID=01010101
After opening the link you can buy something (sorry the product is secret), this purchase will be saved to my ID=01010101 in this case, now after the purchase is done, the Initial Link (https://example.com/NFC-ID=01010101) would need to be manipulated (automatically redirected) in https://example.com/NFC-ID=01010101/product123/succesfully/purchased.
In my case i would need to set up a Log-In with a password to the ID=01010101 so that the delivery can only be set after you submit the password in the next session.
Now after scanning the the NFC it appears only the Link https://example.com/NFC-ID=01010101/product123/succesfully/purchased on a custom interface, to open the delivery settings i would need to input the password that i've set before manipulating the link.
So in short words, i need to manipulate an initial link to every session i will do, so that after scanning the nfc i will come to the session where i was at least.
Is it possible to manipulate/redirect links in that way after submitting steps, so that my database knows that my initial link has to go to another URL?
I try to understand and find alternative solutions, would appreciate your help a lot!

Upload img to 3rd party and get URL

I'm working on a resume site that allows you to link a URL, but not upload it. I don't really want to have to pay for storing images on my server for a resume project, so I was hoping to create a button or link that does this...
Upload an image to a 3rd party website/server, such as imgur
Get a link from the upload
Automatically insert the link into the form field I currently have for linking to images (I think I know how to do this part)
I'm not stuck on imgur, but it's one of the only sites I know that allows users to upload photos and get URLs easily without creating an account...Anyone have any suggestions? I feel like something like this must have come up before.
PS. I'm trying to advertise myself as an entry-level MEAN stack developer, so I'm trying to keep everything on the website inside of the JavaScript libraries if possible.
Thanks!
very easy to use as temporary hosting:
img2url.site
https://pypi.org/project/Img2UrlApi/
its not a good idea to store images there for longer time,
only as "buffor" to get an url.

Wimpy Player unable to play from local server?

It seems wimpy player tries to append http://root/link_i_provided to find the location of the file.
I already have the location of my file which is on another server. I can play this directly from the browser just fine so I know the link works.
wimpyButton.play('\\10.10.2.2\storage\calls\call1.wav')
It tries to turn my link into an http link like the following
http://mywebsite.com/10.10.2.2/storage/calls/call1.wav
Which of course it can't find. What do I need to change within the Wimpy Player js to stop this behavior? Or perhaps another solution?
EDIT
It looks like this may not be possilbe due to browser security. I'd have to turn the server that holds the recordings into a web server and provide the links that way it seems.
put your files needed on google drive inside a folder, then get the sharable link of that folder. with that you can reference files needed with www.googledrive.com/host/IdNumberOfFolderHere/fileNameOrNestedFolder/fileName.blah

Encrypting Src of Iframe

I own a website. There are some movies on the website, which are made by myself. I want to make money from the website by creating paid movies. That means the website visitor need to pay to watch the full movie or to download the movie.
In the website, the movies are played in an Iframe now. My idea is to upload the paid movies into a directory. The directory's name is as complex as a password. Then I will hide the name of the directory so the website visitors cannot download or watch the paid movies without going into my Iframe.
I have already used javascript to prevent right click "Open in new tab" and "Open in new window". I want to know how can I encrypt the Src of the Iframe so that the website visitors will not know anything just by watching the source code.
Please use PHP or CSS or HTML of JAVASCRIPT to solve this problem. Thank you.
Everyone will be able to look up the videos real url using the network inspector / console. The only way to really protect your videos from being watched from unauthorised people would be setting up an appropriate pay wall / authentication scheme.
Encrypted Media is the standard you're looking for.
It will not do what you asked, but is the solution for you.

Read Flash Cookie from javascript or ASP.Net

We have a flash video that was created for our project, we dont the source so we have to work around the compiled flash file. We are going to host the video on our domain and the video creates a sol cookie (flash cookie) file to store how far the user has proceeded though the video. So my plan is to access this cookie to see how far the user has progressed and then fire an event when they have finished the movie.
I have been googling for some help but haven't found to much. I have found out that its possible to do in javascript and I have found some .net sol file viewers but haven't seen any examples I can get my mind around.
I have watched the traffic that gets created with fiddler and every time the next button is clicked a new request is fired with the swt file that is being accessed. I would also be happy with tracking every time one of these swt files has been accessed as well.
Thanks
I'm not familiar with flash, but I'm sure you need to build another flash-movie(those shared objects can only be accessed from flash-movies).
So what you need is your own flash-movie embedded in the page, that reads the 'cookie' and transfers the data to javascript.

Categories

Resources