Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with wget
#1
recently i uploaded a file in https://send.firefox.com/ but when i try to download a file using wget command the file is not being downloaded. Please show me the right command which can achieve this task
Reply
#2
Are you getting errors? It should be as easy as wget your_url_here.
Reply
#3
i am not getting error but i am not able to download the file it just download the index.html page
Reply
#4
How does send.firefox.com work? You get a link to a page, and once that page loads, there's a button to click to actually download the file?

If that's the case, you can use beautifulsoup to scrape for that link, and download it. Or you could try using wget with the -r parameter (recursive, so it downloads anything that's linked to that page). https://www.gnu.org/software/wget/manual...e-Download

But recursive mode (I think) only works with links. So if send.firefox.com doesn't use a link, and instead uses a button+javascript, you'd need to scrape the page to find the actual url.
Reply
#5
Yes the send.firefox.com doesn't use a link, so the only way now is to scrape the page to find the actual url but it's really hard for me to scrape a page
Reply
#6
(Mar-22-2019, 04:40 AM)whatloop Wrote: Yes the send.firefox.com doesn't use a link, so the only way now is to scrape the page to find the actual url but it's really hard for me to scrape a page
There is no way way to find download ulr in the Firefox index send page,i have looked.
The download link only get generated after pushing the download button.
Eg https://send.firefox.com/download/79ceb930f5/
If want to try to get link need reverse engineering of generated 79ceb930f5(new value every download),also try getting/run the JavaScript that generate the link.
Reply
#7
You can't reverse engineer, otherwise you have to guess randomBytes: GitHub Firefox Send

You can see here, how someone implemented uploading to ffsend with Python: https://github.com/nneonneo/ffsend/blob/.../ffsend.py
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#8
Just to try a solution's that will download automatic from a script.
headless option do not work in case as using browser own download mechanism,probably a way around if look closer into it.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
import time

#--| Setup
chrome_options = Options()
#chrome_options.add_argument("--headless")
browser = webdriver.Chrome(chrome_options=chrome_options, executable_path=r'C:\cmder\bin\chromedriver.exe')
#--| Parse or automation
# FireFox send link
url = 'https://send.firefox.com/download/00db8d7758/#oiKrIJUltj-SbNPJs7QcjQ'
browser.get(url)
time.sleep(3)
down_button = browser.find_elements_by_css_selector('#download-btn')
down_button[0].click()
time.sleep(3)
browser.quit()
Reply
#9
Thanks a lot snippsat you open up a whole new world for me.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020