How can I get dynamic html from a webpage? - html

I'm trying to grab the inventory levles of a TB product example:
https://item.taobao.com/item.htm?id=635344161697
It normally doesn't show unless I click the increase quantity button.
Also would this be transferrable onto the international URL? https://world.taobao.com/item/640409581110.htm
Tried looking into network requests but not too familiar with it and couldn't find anything

Related

How to direct clicks based on the original click and then a selection

Im failing to find the correct terms for what I'm looking to do. I'm not a coder but I can get it done If I get pointed in the correct direction.
I have a network of sites. A main website, a blog, and 3 different woocom stores (international legal reasons all 3 need to be completely separated) I need to be able post a link to a product,let's say "www.--.com/product-x", on the main site the blog or a stand alone link in maybe a Facebook post. Once a potential customer clicks on that link I want them to be sent to a region select page of which there are 3 options. But I don't want them to just be sent to the landing for the woocom store of there selection I want them to be sent to "na.--.com/product-x" or "eu.--.com/product-x"
If it were just 4 or 5 products I would just duplicate the region select page but this isn't realistic. I'd like to compile the "/product-x" part of the URL from where they clicked from,and the "na." And "eu." Part of the URL from there selection.
I'm willing to do some possibly cumbersome .htaccess upkeep or add the pathways individually each time a new product link gets made of that keeps things simpler but aibjust don't want 100 region select pages.
I am aware of Geo-redirects but I'm just not there yet. I for the world can not type the correct thing into Google to find any help on this, and it's not conceivable to me that this is an original idea.
What is this called?

webscraping the current page in its current state

ive webscraped before using beautiful soup by making a html request.
but now i dont want data from say wikipedia,i want data from something after it has been modified by the user. eg teslas website has this feature https://www.tesla.com/en_gb/models/design#battery where you personalize your car. suppose i wanted to open this page, change the settings from long range to high performance and THEN grab the inner html from
<span class="specs--value">
(how long it takes to go from 0 to 60)
how could i do this. write a script in python/c# which can grab data from the browser i currently have open, using what tools can i gather data from my current browser
ideally this will be for google chrome
edit:
alternate idea. perhaps i could make a post request which somehow recieves html data as if i did click on the high performance button. but how could i do that?
You could use selenium, It allows to simulate user navegation and extract data during the process.

Getting a specific text from a website using Regex in Shortcuts

I’m trying to create a Shortcut on iOS that uses Regex, what I’m trying to accomplish is getting the price of a product from a website but no matter what Regex commands I use don’t work. It would be easier if my computer was up and running and I was able to use addons to view the site better but I’m stuck on iOS for the time being. Viewing the source code line 606 displays
'productPrice':'409.99',
But nothing I try pulls the the price even from different lines in the code.
I’m trying to get the price from https://www.microcenter.com/product/512484/intel-core-i7-9700k-coffee-lake-36-ghz-lga-1151-boxed-processor
I just can’t figure out how to retrieve the price being shown, I’ve tried so many combinations I had to turn to more experienced user help.
this works for me: 'productPrice':'(.*?)', - link
Make sure you are getting the part of the page source that contains this information.
The answer was so simple, if using shortcuts on iOS I was able to pull the price of the MicroCenter product by these commands.
URL - microcenter page to product
Get Contents of URL (leave as is)
Get Text from Input
Match Text - Pattern - \$......
Get item from list - Item at Index / 2 (2 is for items on sale or not)
The rest you can decide what to do with it, make a notification or whatever you decide how to display the price. This answer I found was a way to make sure it works. Now I’ll make a menu of multiple items from micro I have my eye on to pull all the prices in 1 click display. https://m.imgur.com/Iljvsx6

HTML button from a webpage to a specific item from a specific Amazon seller

A friend of mine used wix to build a small site selling t-shirts. He also put them on amazon.
Is there any way to create buttons to send the buyer to amazon to purchase the item from my friend.
He isn't selling unique items so there will be multiple sellers, also wix is a static site generator.
If you visit the Amazon page for the item you want to link to, you can copy its URL straight from the browser's address bar. You can delete the parts of the URL starting with /ref=..., which are used by Amazon to track visitors and aren't necessary. This YouTube video explains how to create a linked button in Wix.
For example, if you search Amazon for stack overflow robot t shirt, you'll end up at a page that looks like this:
The first two items are identical, but are sold by two different vendors. The second one (FZLB) is 1¢ cheaper, so let's go there:
The highlighted part of the address bar shows what you need to copy. Paste this into the "Link To" box in the Wix button settings dialog. That's all there is to it.

Forcing popup when coming from external websites (e.g google)

I work for a restaurant guide in the NW of the UK and we basically have featured restaurants (the ones who pay a monthly sub) and non-featured restaurants (the ones who get a basic free listing).
We were looking to get some kind of popup appearing on the non-featured restaurants, but only if they came from an external site, e.g Google.
So the steps would be:
1) User goes to google and puts in "name of unfeatured restaurant"
2) Our company comes up with the basic listing of that restaurant
3) User clicks the link but is then presented with a popup of featured restaurants
But, we would only need the popup to appear if the user has come from an external site. So if they were they came internally from our website the popup wouldn't show.
We use ASP at work and I was thinking it may possibly need some kind of a variable being passed through, or maybe something to do with cookies but I'm not an expert on the ASP side.
Hope someone can help on this :)
To see where a user came from you can try:
<%=Request.ServerVariables("HTTP_Referer")%>
This would contain the referring URL. if you want to use it on subsequent pages, you'll have to store it ofcourse in a cookie or session variable.