Next track or shuffle in M3U playlist? - multimedia

I have an M3U play-list that has URLs for some MP3s from around the web. It's on a server so I can open it on other computers and my iPhone.
Unfortunately, all the players I've tried don't let me hit the "next" button to go to the next song in the play-list. Is there a way to specify that ability in the M3U file? Or, if not that, can I make a media player to automatically shuffle the play-list?
I could always make a script to shuffle it myself, but I'd like to use something built into M3U if it exists.

if you don't already have the length of the track in your M3U, try including it, in this format:
#EXTINF:180,Unknown Artist - Unknown Track
/tmp/musicfile.mp3
(where 180 is the length of the track in seconds)
Alternatively, have you seen this article on creating iPhone-and-desktop-friendly embedded-audio web pages?

Related

Is there a way to simulate a user search on the Youtube API?

I am trying to collect some data for a pet study. I would be collecting some metadata on the video suggestions based on a search. I was wondering if it is possible to do the following using the Youtube API(python or R) :
Input a search keyword and get the results
Choose one of the videos randomly and see the list of video suggestions.
Choose one of the suggested videos randomly.
Repeat this "n" times.
Is there a way to emulate this entire process? I think web-scraping can be an option but I am not really sure, how I would go about it. So if there are nay pointers that would be amazing and get me started.
Also, Is it possible to have no history, as in an option to erase all the cookies for the previous attempt(Steps 1 through 4) and start afresh? (More like an option to have this in Incognito Mode)
TIA for your suggestions.
AFAIK Google tracks the computer you are using in such a way that you can't escape their filter bubble. Even through Tor, YouTube might prefer some content related to the exit node IP location (and so language) or any previous YouTube search done by you (through this exit node) or another user of the end node or any computer using the same IP as the exit node...
The YouTube Data API v3 has a possibility to retrieve suggestions thanks to part=suggestions with Videos: list by authenticating with OAuth (so results might not be neutral). You can get the initial videos thanks to Search: list thanks to q filter. Web-scraping is also doable to be less tracked, my open-source YouTube operational API is able to web-scrape search results for instance.
Note that a French person claims having achieved to have done such a neutral French YouTube suggestions graph.

How to open 100000 different websites manually

I need to click in 100000 different url from websites to scrape different data about the website. The data has to be manually extracted because it is different on each website and it doesn't follow a pattern.
My question is, is there any program or script where I can paste the 100000 URL and it just open/preload some urls in tabs/windows so when I close one tab the next url opens in a new tab? This way I work in the main website tab that takes me 10 seconds to review and I click control+w and go to the next url.
This way I could save so much time instead of just clicking manually on each link and waiting for it to load.
You can use python web scraping or RPA(if you don't know basic python) and by logical steps, users can automate n number of tasks to be done.
Or you can also make use of 'pyautogui library' of python to click on visual things.
Thumbs up. If helped...

What is an acceptable way to print from app maker?

I'm trying to figure out what the best way to print from App Maker. I have a guess management app and I need a way to print out guest passes from app maker. I have some ideas, but I'm not sure what would work or be the acceptable best practice. These will print out on a 4x6 thermal printer. Any working examples would be greatly appreciated. I've only managed to get option two below to work without css formatting.
1) Open the guest info in a page fragment and print it. This would need to print the page fragment as displayed, unsure if this is possible in app maker.
2) Create an html page by passing the guests information, open the page in a new tab and use windows print.
3) Use a mailmerge of sort on a document on google drive and print with cloud print. I'm worried that the lag time might make this slow. I'm also unsure if it's doable.
Thank You
It sounds like you want to manually print them.
You could have a 'Visitor Card' template saved as either a Google Document or Google Sheet. When the visitor signs in, duplicate that document, write your visitors information to the appropriate cells/positions, then save as a PDF in a Google Drive location.
All of the above can automated, so you'll simply have to have a tab open at the Drive location and then print the file once saved. The saving process shouldn't take any longer than 5-10 seconds, which I think is a reasonable timeframe.
Another option, which is more technical, is you directly send a request to your printer to print. Although, this would depend on your printer and technical capabilities.

Retrieve a number from each page of a paginated website

I have a list from approx. 36,000 URLs, ranging from https://www.fff.fr/la-vie-des-clubs/1/infos-cles to https://www.fff.fr/la-vie-des-clubs/36179/infos-cles (a few of those pages return 404 erros).
Each of those pages contains a number (the number of teams the soccer club contains). In the HTML file, the number appears as <p class="number">5</p>.
Is there a reasonably simple way to compile an excel or csv file with the URL and the associated number of teams as a field ?
I've tried looking into phantomJS but my method took 10 seconds to open a single webpage and I don't really want to spend 100 hours doing this. I was not able to figure out how (or whether it was at all possible) to use scraping tools such as import.io to do this.
Thanks !
For the goal you want to achieve, I can see two solutions:
Code it in Java: Jsoup + any CSV library
In a few minutes, the 36000+ urls can be downloaded easily.
Use a tool like Portia from scrapinghub.com
Portia is a WYSIWYG tool quickly helping you create your project and run it. They offer a free plan which can take in charge the 36000+ links.

Connecting track names and artist names with Spotify Uris

I've found related questions (like this one), but nothing that directly answers my question: I need a direct way to turn artist name and track name into a spotify link. Just like spotify does for the local file list (some are links, some are not, I assume because spotify doesn't have those tracks.
How can I turn something like artist:'Francolin' and track name:'Hospital Song' into a Spotify uri without searching for it (which will return multiple results, and I don't know which one to use). How does the Spotify local files list do it?
The local files list in the Spotify client makes URLs like this:
spotify:local:Coldplay:Mylo+Xyloto:Paradise:277 (spotify:local:ARTIST:ALBUM:TRACK:LENGTH_IN_SECONDS). You can verify this by right-clicking a local file in your list that hasn't been linked to a Spotify track and choosing "Copy Spotify URI".
When playing the track, the client resolves it without using the backend at all - it searches its own local list of known files and plays whichever matches it closest.
When linking to a "real" Spotify track, the client asks the backend to do the dirty work. There isn't a web API for this (it's in libSpotify though), but basically the backend does a few heuristics to the data* then chooses the track that matches the given data (including length) the closest.
*Basically, the track metadata is stripped to a simpler form when searching, and the album has less weighting since an artist may release the same track on multiple albums.
I ran into the same problem as you but I don't think there's a direct way to convert it. Instead I just run for a search with "artist:'$artist' title:'$title'", which should be very accurate, and just use the first result in the array of results.

Resources