A Uniform Resource Locator (URL) is a Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it.

learn more… | top users | synonyms

4
votes
0answers
20 views

Expanding url from shortened url obtained from tweet

I have a twitter data set. I have extracted all the expanded urls from the json and now am trying to resolve the shortened ones. Also, I need to check which urls are still working and only keep those. ...
10
votes
2answers
557 views

Taking YouTube links out of a list of GitHub repo READMEs

I have a .csv file that contains student GitHub repository assignment submissions. I made a script to go to each repository and extract the YouTube video that they must have provided in their README ...
5
votes
2answers
89 views

C++ Query String Parser

This query string parser is intended to parse the parameters and values of a parser query string. I'm particularly concerned about my use of std::move(...). I ...
0
votes
1answer
86 views

URL decode a string but log an error after second exception

I have a method which does URL decoding on the string value passed along with using Charset: ...
4
votes
3answers
63 views

Getting the Twitter account from various input formats

I have an input for users to enter a Twitter account in any different way and I want to extract the user account. For example: ...
1
vote
0answers
94 views

Parse query filter expression from request URL

I am building a backend APi for which I need to extract query filters from request URL of following pattern: ...
3
votes
1answer
41 views

T-SQL UDF to replace replace base URLs

I have a problem where I need to replace every base part of URLs in a body of text. However, I only want to replace it in specific URLs. Only URLs that go to "resource.aspx" that have the "source" ...
0
votes
2answers
68 views

PHP script to generate hreflang tags

I'm currently working on a website which provides content to users based on their region. As a result the website has subdirectories for the appropriate regions. For example, a pricing page would look ...
4
votes
1answer
73 views

Summarizing and crawling the content of a URL

Lately I've been working on a practice project using JS ES6 to understand it better, therefore I've read a lot about JS design patterns and JS coding strategy. My question is about splitting the ...
1
vote
2answers
261 views

Returning a URL string of an API endpoint

I have a class with multiple methods which return a URL string of an API endpoint. Each method takes different parameters based on what the endpoint have to include. Examples (among others): GET: <...
1
vote
2answers
44 views

Functional method for storing a query string as a simple key-value object

I'm working on an isomorphic javascript module (query-hash) to handle query strings and base64 tokens. It's essentially a simple key-value object with methods for taking in data and giving it back in ...
3
votes
3answers
171 views

URLIfy a character array using Python - follow-up

This is a follow up to my last code review: URLify a string using Python This problem has been reviewed in other languages, but I tried to solve this without looking at those answers. I am hoping ...
6
votes
2answers
369 views

URLify a string using Python

I have been working my way through the exercises in the book Cracking the Coding Interview. I wanted to get feedback for the following exercise. Write a method to replace all spaces in a string ...
2
votes
3answers
76 views

Appending a trailing slash if needed

I like to overcomplicate things, this is fairly simple though but I would like to keep it simpler without lowering readability. Not just to improve my code but also my self. ...
0
votes
1answer
62 views

Return the last word of the url and capitalize the first letter

Can the below code be done in one line? Do you think it should or is it ok like this? ...
0
votes
2answers
56 views

Exception handling in URL builder method

I have a method which is part of a request-handling class. It creates a URL, depending on the resource send request. This is a part of the REST service: ...
-1
votes
2answers
62 views

Initiating some activities depending on the presence of certain URL parameters

What is the best way to refactor this long if else statements? make it shorter and more readable code. I thought to use sub-classes but I don't understand how to implement that, so examples will be ...
4
votes
2answers
26 views

Isolate URLs from other text around it and put each on own line (with sed)

I have a small shell script that uses sed to take an input file of URLs with hand-written notes around them and strips the notes and puts each URL on its own line. ...
5
votes
2answers
206 views

Express middleware to validate URL and tags

I am building an API where the client can send a url and some comma-delimited tags: ...
6
votes
2answers
106 views

Django controller method to list the top characters, guilds, and killers

I've been reading the Chapter 8 of this book. Here's the view I'm currently coding. It list all characters/guilds according to the type of URL. ...
3
votes
1answer
55 views

IsImageUrl extension method written in F#

I'm a newbie to F# and so I've written a small extension method library to practice the language. The extension method attempts to determine if a url string is for an image. I wrote the code as an ...
6
votes
2answers
390 views

C# helper class - mailto

I'm looking for input, advice, criticism. This is my first helper class. While use of mailto URLs should most often be trivial, I have a real world need to send to multiple recipients and with a body ...
10
votes
1answer
709 views

Efficiently using Apache HttpClient in multithreaded environment

I have a library which is being used by customers and they are passing DataRequest object which has userid, various ...
3
votes
0answers
57 views

Determine base URL of PHP app

I have this little piece of code which determines the base URL of PHP: ...
0
votes
1answer
39 views

Loading URLs via a case statement

I have the following code which loads in a URL based on the id of a user-clicked button. I'm looking to compress it down as much as possible, and make it more modular and reusable: ...
-1
votes
1answer
36 views

Skipping Google search results that point to certain sites

I have the following code that will skip certain URLs if needed: ...
2
votes
1answer
232 views

Javascript RegEx match URLs for tokens extraction

Given a URL like this: ...
1
vote
2answers
80 views

Recreating a URL string

This is what my viewObject looks like: ...
3
votes
1answer
97 views

Parsing URL query and appending it at end of the other URL

I am trying to grab the URL query of the URL which is in the browser's address bar, then append it at the end of the other URL and echo it to the browser. So, if I visit my script at: http://...
2
votes
1answer
54 views

Building a SharePoint Search URL

I'm trying to build a URL to call the SharePoint Search REST API in TypeScript. The interesting part is building the querytext, which is done by my buildQueryText method. In my case it takes two ...
1
vote
0answers
151 views

URL validation and data extraction

What do you think about this approach to validate and analyze URLs? There are Url and Url<TResource> model types to ...
4
votes
1answer
71 views

Extracting various URL parameters in Rest Service and then passing it to Builder class

I have a service which takes a lot of key value parameters in a URL. Only a few are mandatory and others are optional. It's up to the customer whether they want to set those optional parameters or not....
3
votes
2answers
364 views

Parsing “mailto:”

Can you help me to review my "mailto:"-parsing function ? Since I'm trying to write less code, that is as simple as possible. I'm not sure there if there is some bug or better solution. ...
1
vote
1answer
87 views

Converting url data to base 64

I've a piece of code down below that I'm really unsure about. Basically an user can type the url (urlStr param of the method) he wants. From this url I need to : get the data as Base64 so I can ...
5
votes
1answer
121 views

Router to match URL to Controller Method

I wrote a router class which accepts a URL and calls the appropriate controller method based on it. I'm a little worried about the amount of dependencies it has (eg ...
3
votes
2answers
123 views

str_replace vs array_map & trim on URL segments

Are there any advantages on using array_map & trim vs using simple str_replace? The ...
3
votes
1answer
65 views

Construct a URL given an Enum

I have a below code which constructs the URL given a FlowType enum. ...
4
votes
3answers
572 views

Generating a URL

I have a function that generates a URL using a stringbuilder: ...
3
votes
1answer
161 views

Downloading HTML documents from the web

In this project I'm working on, I need to extract articles text from their original HTML document. This class, HtmlConnection, receives the URL of the article, and ...
0
votes
0answers
278 views

Adding a link on page with current URL (including hash) in a querystring

I'm trying to add a link to a page. The link should contain the current URL in a querystring (to be used as a ReturnUrl) and it can contain a hash. Middle-...
1
vote
3answers
411 views

URL Query params builder

My goal is to create a URL query params from std::map<std::string, std::string>. For example, we call ...
8
votes
1answer
332 views

Read and replace URL from PDF file

This is a code I wrote to find all URL within a PDF file and replace the one that matches the ID that I passed as a parameter. It works as intended, but as I am a beginner on Java, I am sure there ...
8
votes
2answers
86 views

Opening all the links

I am looking to improve my code structure. In this code it is opening all the links with ?pid= in the url. However, the structure of the code can be improved. <...
7
votes
2answers
531 views

Efficient URL Escape (Percent-Encoding)

Here I have a simple algorithm to percent-encode any string. (Specification from Wikipedia; note that this is not compatible with URLEncoder.encode()) Is this an ...
4
votes
1answer
859 views

Short hash generator

I am working on some code that will generate a link with a relativly unique 10 character hash. I am not worried to much about colisions as long as they are rare enough that I could have a couple ...
3
votes
0answers
57 views

Item purchasing using urllib

I have this function that gets an item passed from another function, together with the subtotal and the fee of the item. The function has to act as fast as possible, as other people also want the item....
3
votes
2answers
306 views

Extracting and normalizing URLs in an HTML document

I have written code to get all urls on a webpage & put them in a set, and would like tips on simple changes I can make to increase its performance. ...
5
votes
1answer
181 views
2
votes
2answers
81 views

Prettifying URLs for a PHP-based club website

I have a website for my car enthusiast club ("example.org") whose content can be divided into three main sections: Startseite (the "front page" of the site), Mitglieder (membership directory), and ...
4
votes
1answer
78 views

Adding proper validations on all the parameters coming from the URL in Rest Service

I am working on a RestService in which my URL will take lot of parameters. Below are the parameters my URL will take: UserId: ...