Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
I want to download mp4 from blob:https://twitter.com

I am using selenium. As result after running the code, it says file not found. Could you someone help me.

def get_https(driver, uri):

blob_script="""
    console.log(arguments);
    var uri = arguments[0];
    var xhr = new XMLHttpRequest();
    xhr.responseType = "blob";
    xhr.open("GET", uri, true);
    xhr.send(); 
"""  

print("execute_async_script -> "+uri)
result = driver.execute_async_script(blob_script,uri)
print('result = ' + str(result))
return result


    

def scrape_video_link(driver):

body = driver.find_element_by_tag_name('body')
scrolling=True
while scrolling:
    body.send_keys(Keys.PAGE_DOWN)
    time.sleep(1)
    try:
        image_element = body.find_elements_by_css_selector('div[data-testid="videoPlayer"]')
        for video_div in image_element:
            href = video_div.find_element_by_tag_name("video").get_attribute("src")
            return href            
    except Exception as ex:
        print("Error video not contain")

def main():

name='BallySportWest'
url="https://twitter.com/"+name
driver.get(url)
time.sleep(2)
href=scrape_video_link(driver)
bytes = get_https(driver,href)

chrome version 102.0.5005.61 ERR_FILE_NOT_FOUND

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!