LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 04-27-2024, 03:48 AM   #1
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622
Blog Entries: 40

Rep: Reputation: Disabled
any url shortener allows immediate request parameters?


Good morning

Do you know of an url shortener service online that still reacts to a full request, like with wget or curl, complete with parameters (in april 2024, that is)?

The examples I find on the Web are outdated, my tests have shown that this does not work any more with most of the services used a while ago.

So, if I am interpreting this correctly, you have to access via the start page and fill out a form, each time. I am installing the Rust urlshortener for cli and am at “Updating crates.io index” for half an hour.

Now it downloads tons of dependencies, while all that I wanted was parse some HTML.



Edit: I can write a Selenium- or Watir Webdriver bot. The problem is that I want to *recommend* something to others. I can skip the whole topic, too, if need be.
Edit II: (off-topic) The Watir Web-Site at https://www.watir.com is down, but the content is copied to https://watir.github.io/. For those who want to know.

TIA

Last edited by Michael Uplawski; 04-27-2024 at 04:06 AM. Reason: typos and stuff, one finger or other is on strike.
 
Old 04-27-2024, 04:25 AM   #2
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled
So upon testing urlshortener-cli with some arbitrary URL like
Code:
 urlshortener-cli https://www.linuxquestions.org/questions/lqsearch.php?do=getnew&daysprune=7
I notice that they used the url-shortener at <https://is.gd>.

Now guess.
Code:
curl "https://is.gd/create.php?format=simple&url=https://www.linuxquestions.org/questions/lqsearch.php?do=getnew&daysprune=7"
https://is.gd/zXL7fq
Here is my list of useable url-shorteners.
  1. is.gd

The services used by the urlshorteher-rs library are in their Readme: https://github.com/iddm/urlshortener-rs

But the domains are not all valid and at least for the last one (biturl.com), I cannot find out how to use it with curl.

Anyway: apt remove cargo; rm -rf ~/.cargo

Last edited by Michael Uplawski; 04-27-2024 at 04:41 AM.
 
Old 04-27-2024, 04:07 PM   #3
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled
URL shortener for the desktop. Needs YAD:

Code:
#!/bin/bash
icon='your_url_icon'
title='shorten URL'
text='URL'
# the part of the request-string which precedes the url to shorten
service='https://is.gd/create.php?format=simple&url='

url=$(yad --image="$icon" --window-icon="$icon" --title="$title" --form --field="$text")
if [ "$?" == 0 ]
then
  url=`echo $url | tr -d '|'`
  echo "|$url|"
  if [ "$url" != '' ]
  then
	su=`curl "$service$url"`

	echo "$su" | yad --undecorated --on-top --image "dialog-info" --window-icon="$icon" --title "Result" --selectable-labels --text="$su"
  else
	yad --on-top --undecorated --image "dialog-warning" --window-icon="$icon" --title "INPUT EMPTY" --text="No url given!"
	exit
  fi
else 
  exit
fi
Screen shots (German locale, “Cancel” = „Abbrechen”): dialog, dialog with URL, result
Attached Thumbnails
Click image for larger version

Name:	sc_dialog.png
Views:	4
Size:	5.0 KB
ID:	42737   Click image for larger version

Name:	dialog_with_url.png
Views:	2
Size:	8.9 KB
ID:	42738   Click image for larger version

Name:	result.png
Views:	2
Size:	4.1 KB
ID:	42739  

Last edited by Michael Uplawski; 04-27-2024 at 04:11 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Install Shlink URL Shortener with Nginx on Ubuntu 20.04 LXer Syndicated Linux News 0 07-15-2021 09:59 PM
LXer: How to Install Shlink URL Shortener with Nginx on Ubuntu 20.04 LXer Syndicated Linux News 0 06-28-2021 07:02 PM
LXer: How to Install YOURLS self-hosted URL shortener on CentOS 8 LXer Syndicated Linux News 0 10-31-2020 06:13 AM
LXer: How to build a URL shortener with Apache LXer Syndicated Linux News 0 07-20-2018 11:51 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 04:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration