How to import data from a url to pandas dataframe?

I’m trying to import data from the following url into pandas dataframe: https://www.asx.com.au/data/shortsell.txt I tried the following: url = ‘https://www.asx.com.au/data/shortsell.txt’ reader = pd.read_table(url, sep=’\t’, skiprows=lambda x: x in [0, 1, 2, 3, 4, 5, 6, 7], header=None, names=[ ‘ASX’, ‘Company Name’, ‘Product/’, ‘Reported Gross’, ‘Issued’, ‘% of issued capital’]) I expected to get data in… Read More How to import data from a url to pandas dataframe?

PHP detect if slug URL starts with ES/ or EN/

I need to detect the language the user is using to include the correct file using PHP if elseif or else like this: users are comming from: example.com/EN/nice-title-url-from-database-slug example.com/DE/nice-title-url-from-database-slug example.com/ES/nice-title-url-from-database-slug the php I need is something like this: PHP document.location.toString().split(…) etc detect the url paths if url path <starts with /DE/> include de.php elseif url… Read More PHP detect if slug URL starts with ES/ or EN/

how i open this link in new tab?

function myFunction() { var x = document.getElementById(“frm1”); var text = “”; var i; for (i = 0; i < x.length ;i++) { text += x.elements[i].value; } window.open(text, “_blank”); document.getElementById(“demo”).innerHTML = text; } .center { margin: auto; width: 60%; border: 3px solid #003fff; padding: 10px; text-align: center; } <div class=”center”> <h3>go to city</h3> <form id=”frm1″> link:… Read More how i open this link in new tab?

R: Webscraping Pizza Shops – "read_html" not working?

I am working with the R programming language. I trying to scrape the name and address of the pizza stores on this website https://www.yellowpages.ca/search/si/2/pizza/Canada (e.g. https://www.yellowpages.ca/search/si/2/pizza/Canada, https://www.yellowpages.ca/search/si/3/pizza/Canada, https://www.yellowpages.ca/search/si/4/pizza/Canada, etc.) I am trying to follow the answer provided here: Scraping Yellowpages in R library(rvest) library(stringr) url <- "https://www.yellowpages.com.au/search/listings?clue=plumbers&locationClue=Greater+Sydney%2C+NSW&lat=&lon=&selectedViewMode=list&quot; library(rvest) library(stringr) testscrape <- function(url){ webpage <- read_html(url)… Read More R: Webscraping Pizza Shops – "read_html" not working?

Sending data from javascript to php isn't working: Result null

So my javascript file looks like this: $(document).ready(function() { var map = { url: window.location.pathname //get URL without domain }; $.post("/php/SongOutput.php", {map}).done(function(data){ console.log(map); //Check that the map is correct console.log(data); //Show the value of $_POST["url"]; }) }); And the bit of php is the following: echo $_POST["url"]; Now, as you can see what I’m trying… Read More Sending data from javascript to php isn't working: Result null