my tips about web scraping using python
good to read
useful tools
tips
file IO
Create a new file
1 | def write_file(path, data,mode='a'): |
get elements
1 | import lxml.html |
1 | def get_info_xpath( dom, xpath): |
useful code block
- manipulate dir and file Path
navigate with css selector,and conditons
1 | for link in soup.select('div a'): |
google translator free API
1 | from googletrans import Translator |
-