Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 643 Vote(s) - 3.54 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using wget to force cache clear

#1
I am trying to extract the current date and time from this Wikipedia page (

[To see links please register here]

) using wget in the Windows 10 command prompt. This is for a personal app I am developing, so instead of trying to figure out more complicated c++ (only language I know, and barely) to convert my local time to UTC, then get ordinal dates for my project, I just want to download this page with wget and substring the information I need out of it. The page (when refreshed) has exactly the information I need. I could find another way to do this, but now I am taking it personal and trying to make it a learning experience since it seems it should be simple.

I am posting my script below, but no matter what I do the page is not refreshing when I use wget - it will stay the same unless I open the link in a browser and clear my cache. Shouldn't the script below do this? I tried --no-cache and --no-cookies but no success. Once I open chrome and go to this link (

[To see links please register here]

) and click "purge" I can always use wget right after and it works. I just need this to be automatic without me manually refreshing.

wget --no-check-certificate --no-cache --no-cookies

[To see links please register here]

Reply

#2
This will work:

wget --no-check-certificate --no-cache --no-cookies

[To see links please register here]

--post-data="action=purge"

But forcing the servers at wikipedia to update the cached version of the page across their servers might not be the best way to solve this overall. Since you are programming in C++ you might want to take a look at:

[To see links please register here]

Reply

#3
Might not be exactly what was asked. For those who came here to download the un-cached file -
Unfortunately `wget --no-cookies --no-cache` doesn't work for me, if you can use `curl`
Please consider -

`curl LINK --output local_file_name`
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through