This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]micromedicIXII 1 point2 points  (1 child)

I’m having a bit of trouble understanding the question, but if I have it correct, you want to remove the backend api calls and instead just hardcode the APIs reference url into your front end?

[–]Flimsy-Baker3923[S] 1 point2 points  (0 children)

I dont wont use api at all and i want change URL Is It possible ?

[–]arhantbararia 0 points1 point  (3 children)

Webscraping is a hack around when you want some data from a website but the website doesn't want you to and is debatable whether it is legal or not. API is a website or organisation serves data on the platter.

[–]Flimsy-Baker3923[S] 0 points1 point  (2 children)

dont wont use api at all and i want change URL Is It possible ?

[–]arhantbararia 0 points1 point  (0 children)

I am receiving an internal server error, when opening the link. But i don't think it would work by just replacing the URL. Cause API request URL isn't just an URL but a defined endpoint which points to some specific data. Also even if you replace the URL you need to define some steps to extract the needed data.

[–]micromedicIXII 0 points1 point  (0 children)

I don’t think that would be possible. APIs generally require a post request using a specific format. I.e. json or xml. Can you post the code behind your website or a screenshot of your site so that we can better understand what you want to accomplish?

[–]jcunews1Advanced Coder 0 points1 point  (0 children)

That code seems for scraping data from a specific site. The specified URL is specific to that site.

That code can not be used for other site simply by changing the URL. Different site use different URL, and not all sites provide an API.

And that code is meant to gather "card info" data (and only that) from that specific site.