Questions tagged [url-parsing]

URL parsing is the process of taking a URL and producing a representation of its constituent parts: scheme, host, port, path, query, and fragment. The URL Standard defines an algorithm for URL parsing.

See https://url.spec.whatwg.org/#url-parsing

166 questions
0
votes
4 answers

Parsing URLs using PHP

I have posted a similar question here. However, this was more about getting advice on what to do. Now that I know what to do, I am looking for a little help on how to do it! Basically I have a website that is pretty much 100% dynamic. All the…
James
  • 80,725
  • 18
  • 167
  • 237
0
votes
1 answer

Facebook Like "Object Invalid value" and URL could not be parsed

I am getting this error when I did my OG check at facebook https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.dreampiece.com.au%2Findex.php%3Fmain_page%3Dproduct_info%26cPath%3D2_7%26products_id%3D459 Object at URL…
Faith Tong
  • 1
  • 1
  • 1
0
votes
1 answer

Django get last GET parameter

I've been working with Django for a few months now so I'm still new at it. I want to get the last GET parameter from the URL. Here is and example of the URL: example.com?q=Something&filter1=Test&filter1=New&filter2=Web&filter3=Mine Is there a way…
prototype
  • 3,303
  • 2
  • 27
  • 42
0
votes
0 answers

C# get url parameter namevaluecollection from rewritten url

If the url is not rewritten say like this &tag=sql&page=3 I would get the parameter collection like this var parameters = HttpUtility.ParseQueryString(uri.Query); But if I have something like this /tag/sql-i/page/3/ That doesn't work. What would…
Para
  • 2,022
  • 5
  • 34
  • 73
0
votes
3 answers

Exception while parsing the url

I am getting the exception while parsing the content from am url. The exception i am getting is given below. 10-16 12:46:59.373: E/AndroidRuntime(4362): FATAL EXCEPTION: Thread-12 10-16 12:46:59.373: E/AndroidRuntime(4362):…
user965071
  • 1,643
  • 5
  • 16
  • 16
0
votes
1 answer

Parse KOI8-r encoding objective c

I need to parse url which is actually in KOI8-R encoding and as i've surfed there is no encoding in objective c which allows to do that. It used to be smth like this NSString* fileText = [NSString stringWithContentsOfURL: [NSURL…
Morckovka
  • 103
  • 13
-1
votes
2 answers

Get the dynamic number after the last "/" of external url

I want to grab the last dynamic numbers of an external URL. https://data.aboss.com/v1/agency/1001/101010/events/xxxxxx $url = https://data.aboss.com/v1/agency/1001/101010/events/; $value = substr($url, strrpos($url, '/') + 1); value="
Ben
  • 1
  • 2
-1
votes
4 answers

How to get specific part of any url using urlparse()?

I have an url like this url = 'https://grabagun.com/firearms/handguns/semi-automatic-handguns/glock-19-gen-5-polished-nickel-9mm-4-02-inch-barrel-15-rounds-exclusive.html' When I use urlparse() function, I am getting result like this: >>> url =…
boyenec
  • 1,405
  • 5
  • 29
-1
votes
2 answers

Validated URL against an Array of URLPatterns. How?

I've created the example below to illustrate the desired outcome. Is it possible to do the same but against an array of URLPatterns? // Example URL with two numerical params const url =…
suchislife
  • 4,251
  • 10
  • 47
  • 78
-1
votes
2 answers

Function handler GoLang using Standard Library

I have an endpoint like events/{id} and a handler for it. How can I get {id} without using Gorilla/Mux. What are the GoLang in-built alternatives that can achieve this? Need to do this without gorilla/Mux or other third-party libraries. I know this…
sxp
  • 193
  • 1
  • 1
  • 11
-1
votes
2 answers

Does a javascript library for parsing URL path segment (matrix) parameters exist?

Given the URL: var urlString = "http://somehost:9090/cars;color=red;make=Tesla?page=1&perPage=10" I'd like some javascript (node) library which i can use to get the matrix parameters (color and make) for the cars path segment, for example: var url…
Matthew Madson
  • 1,643
  • 13
  • 24
-1
votes
1 answer

How to Decode the token used in URL through Jmeter?

When running a load test for 50 users with a steady state load of 15 mins, the samples do not go in the next loop, it means if we put a load of 50 users, in the sample tables for the first 50 samples there are no errors, however all the requests…
-2
votes
1 answer

How to replace url parameter using python

import urllib.parse as urlparse url = "http://www.example.com?type=aaaaaaa&type1=bbbbbbb&type2=cccccccc" trigger = ["value1","value2","value3"] parsed = urlparse.urlparse(url) querys = parsed.query.split("&") result = [] for pairs in trigger: …
-2
votes
3 answers

PHP Parse error: syntax error, unexpected '$_GET' (T_VARIABLE)

First off, yes I have done research and have seen tons of posts like this one. I see the post this is supposed to be a duplicate of but it was not helpful. I am very new with this and do not know how to apply their results to mine. I'm getting this…
Luke Deven
  • 66
  • 1
  • 8
-4
votes
1 answer

Getting C++ As Parameter Value, Result Only C By Using Php

test.php?aa=c++ and echo $_GET['aa'] result only c without ++
1 2 3
11
12