wget download page which is a post-request - wget

I want to download with wget some pages of results. I have found that what changes each time i click the next page button is the last number, as is shown here:
http://www.sth.com/friends/ --> first page
http://www.sth.com/friends/#quickfinder_member_friends_1=2 --> second page
http://www.sth.com/friends/#quickfinder_member_friends_1=3 --> third page
when i try to download the page with wget, it saves always the first page. from the webconsole of mozilla i found that it is a post request and not a get request.
Does anyone know how i can use wget to download these pages?
Thank you.

Related

How do I cancel GitHub Pages redirection?

I created a web page using GitHub Pages. I added the custom domain by following the Settings>Pages path. The page redirect was successfully performed by creating the CNAME file.
I wanted to cancel the page redirect after a while. Therefore I removed the CNAME file and followed all the steps mentioned in the documents. But I was not able to cancel the page redirect. How can I fix this problem?
Since the website redirect is saved in the browser's cache, the redirect will continue even if the redirect is cancelled via the Settings>Pages tab on GitHub; this will automatically cause the CNAME file to be deleted. The way to solve this problem:
Remove the previous redirect by going to Settings>Pages on GitHub.
Rebuild the page via the Actions tab on GitHub.
Click the F12 while the browser is open.
Long click on the refresh button on the browser.
Select the Empty Cache and Hard Reload option.
When you try to enter the website again, you will see that the redirect has been cancelled.

Barba.js - Update URL if a PHP redirect has occured

I've got some dead pages in my site that I just need to redirect.
Thing is, if you click on a link where it goes to one of these redirected pages, the redirection will occur, but the URL will be kept as the old, dead page.
Example: I click on a page /a/ that PHP redirects to /b/. The redirection happens, /b/ is shown, but the URL stays /a/ until I would hard refresh (CTRL+R) the page.
So is there a way to make it so Barba follows PHP redirects and updates the URL to show the right one?

Tampermonkey on Mozilla Firefox (Change redirect link to direct one)

How can I make a tampermonkey scripts to remove some url header from website. When I click the download link, it goes to the another page and ask comfirmation to leave
The original link I got after clicking download
- http://website/go/?https://www31.zippyshare.com/v/123454232/file.html
Supposed that I want to go to direct download link instead
- https://www31.zippyshare.com/v/123454232/file.html
You can loop over the document.links-array with a forEach()-loop and replace all links:
[...document.links].forEach(i => i.href = i.href.replace('http://website/go/?',''));

Translate a web page click to a URL for wget

I use a web page that a client uses to send me large files.
It's in tha far east, so it often requires dozens of attempts to work.
I'd like to script this using bash with wget (or curl) to retry until it succeeds.
The web page has a "Download" button with this:
<a class="button file-node-download" href="#">
Download
</a>
The web page address is https://aaa.bbbbbb.com/p/DWk8R34Qgj0Yof4D.
The filename is the_file.zip.
I click on the button with the href='#' and the browser starts the download.
When I try this in bash all I get is the web page HTML:
wget 'https://aaa.bbbbbb.com/p/DWk8R34Qgj0Yof4D#'
wget 'https://aaa.bbbbbb.com/p/DWk8R34Qgj0Yof4D%23'
wget 'https://aaa.bbbbbb.com/p/DWk8R34Qgj0Yof4D%23the_file.zip'
wget 'https://aaa.bbbbbb.com/p/DWk8R34Qgj0Yof4D%23/the_file.zip'
I can't see any JavaScript on the page that might make this work.
It appears that there's an event listener attached to the A DOM element. You'd need to find it and see what it actually does before you can get a working wget version out of it.
Have a look at the network tab in your browser's development console. You should be able to see what network request is eventually triggered by the click.

The title, link and description don't work

I've been reading guides and examples for a long time (hours) but I can't manage. I tried to use all html meta tag like title, description, and og:property. Also tried to use the link sharer and also to create a new blank page with just the info I want to share to facebook in order to test. Also I tried to generate an random url in php so to have always a different url variable (the url to share and also the url of the main page containing the script). I also grabbed (url linter) a lot of time the url to clean the cache of facebook. It always give me the title of the site domain as title or the url itself as the shared title and description. I don't know what to do.
The main web site is from joomla. In the code of index of joomla I put a php include if the url has the variable "articolo" id. This incuded php page has regulat head body etc. So maybe I facebook check the main meta of joomla first? So now I tried to open a popup with just the page for sharing. Look here: link
It's possible that the title is locked in, meaning that after X number of likes Facebook doesn't allow you to change it anymore. Can you give us an example URL you're having issues with?
EDIT
Ok, now the link you provided shows some very interesting output. http://modernolatina.it/wjs/index.php?option=com_content&view=article&id=96&Itemid=258&autore=6&articolo=6
First, you webserver, instead of sending back a 200 code, is sending back a 500 code.
Secondly the HTML your webserver is sending back has two HTML tags (Do a view source on the content returned)
Fix up those two issues and I think the linter will be happier with your page.
Test your page here:
http://developers.facebook.com/tools/debug