A
A
Anton2018-12-08 21:28:28
Parsing
Anton, 2018-12-08 21:28:28

How to curl select version, platform, arch on https://www.postgresql.org/download/linux/redhat/?

I try curl to select version, platform, arch on https://www.postgresql.org/download/linux/redhat/ - get the page and eventually get "4. Install the repository RPM"
I try like this:

curl --data "version=11&platform=centos-7&arch=x86_64" https://www.postgresql.org/download/linux/redhat/

I do not receive.
Is there any easy way?
Or should I take Selenium?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
planc, 2018-12-08
@planc


How to select version, platform, arch with curl
no way, it's javascript
if you put rpm, it won't add turnips by itself?
https://yum.postgresql.org/rpmchart.php
https://yum.postgresql.org/repopackages.php#pg11
your page generates a string for the repository using this script:
https://www.postgresql.org/download /js/yum.js
var url = 'https://download.postgresql.org/pub/repos/yum/' + ver + '/' + pinfo['p'] + '-' + arch + '/pgdg-' + pinfo['f'] + shortver + '-' + ver + '-' + repodata['reporpms'][ver][plat][arch] + '.noarch.rpm';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question