Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web scraping (selenium (i think))
#4
Here seems to be a method (responses 2 and 3) for win and linux
https://stackoverflow.com/questions/1096...n-selenium

The linux one works for me with selenium to save as in firefox with a few modifications
sudo apt-get install xautomation
from subprocess import Popen, PIPE

save_sequence = b"""keydown Control_L
key S
keyup Control_L
keydown Return
"""


def keypress(sequence):
    p = Popen(['xte'], stdin=PIPE)
    p.communicate(input=sequence)

keypress(save_sequence)
it downloads the css, js, images in a directory

metulburr@ubuntu:~/Downloads$ cd Twitter_files/
metulburr@ubuntu:~/Downloads/Twitter_files$ ls
0.commons.en.e39ce78c2d3da.js     saved_resource(5).html
8.pages_home.en.01b37cfab9b.js  saved_resource(6).html
analytics.js                             saved_resource(7).html
default_profile_bigger.png               saved_resource(8).html
default_profile_normal.png               saved_resource(9).html
delight_prompt.png                       saved_resource.html
init.en.244fa41b6a57.js          twitter_core.bundle.css
Qtz8LqPx_bigger.jpg                      twitter_more_1.bundle.css
saved_resource(1).html                   twitter_more_2.bundle.css
saved_resource(2).html                   twitter_profile_editing.bundle.css
saved_resource(3).html                   Vb8k670S_bigger.png
saved_resource(4).html                   y-kyowAV_bigger.jpg
metulburr@ubuntu:~/Downloads/Twitter_files$ 
Recommended Tutorials:
Reply


Messages In This Thread
Web scraping (selenium (i think)) - by Larz60+ - Jan-25-2019, 09:07 PM
RE: Web scraping (selenium (i think)) - by Larz60+ - Jan-25-2019, 11:47 PM
RE: Web scraping (selenium (i think)) - by metulburr - Jan-26-2019, 01:16 AM
RE: Web scraping (selenium (i think)) - by Larz60+ - Jan-26-2019, 03:12 AM
RE: Web scraping (selenium (i think)) - by Larz60+ - Jan-26-2019, 11:44 PM
RE: Web scraping (selenium (i think)) - by Larz60+ - Jan-27-2019, 12:22 AM
RE: Web scraping (selenium (i think)) - by Larz60+ - Jan-27-2019, 02:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Scraping div tags with selenium, need help hfakoor2 1 1,080 Mar-12-2023, 08:31 AM
Last Post: hfakoor2
  Web scraping cookie in URL blocks selenium Alex06 2 2,459 Jan-10-2021, 01:43 PM
Last Post: Alex06
  Web Page not opening while web scraping through python selenium sumandas89 4 10,138 Nov-19-2018, 02:47 PM
Last Post: snippsat
  web scraping with selenium and bs4 Prince_Bhatia 2 3,786 Sep-18-2018, 10:59 AM
Last Post: Prince_Bhatia
  scraping javascript websites with selenium DoctorEvil 1 3,389 Jun-08-2018, 06:40 PM
Last Post: DoctorEvil
  Combining selenium and beautifulsoup for web scraping sumandas89 3 11,661 Jan-30-2018, 02:14 PM
Last Post: metulburr
  web scraping using selenium sumandas89 3 3,595 Jan-05-2018, 01:45 PM
Last Post: metulburr
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,649 Nov-03-2017, 08:41 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

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