Compare commits
3 Commits
547cec0363
...
a5e7d3c3e6
Author | SHA1 | Date |
---|---|---|
Gharke | a5e7d3c3e6 | 4 months ago |
Gharke | 8b95ab3745 | 4 months ago |
Gharke | fda6ab9f46 | 4 months ago |
6 changed files with 4919 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||||||
|
spam = "That is Alice's cat." |
||||||
|
|
||||||
|
############################################################################### |
||||||
|
# Escape Characters |
||||||
|
# \' single quote |
||||||
|
# \" double quote |
||||||
|
# \\ backslash |
||||||
|
# \n newline |
||||||
|
# \t tab |
||||||
|
############################################################################### |
||||||
|
|
||||||
|
# Raw string prints everything literally |
||||||
|
print(r"That is Alice\'s cat/n") |
||||||
|
|
||||||
|
# Multiline strings |
||||||
|
print(""" |
||||||
|
This is a multi-line string. |
||||||
|
It is made up of three lines. |
||||||
|
""") |
||||||
|
|
@ -0,0 +1,8 @@ |
|||||||
|
import requests |
||||||
|
|
||||||
|
res = requests.get('https://automatetheboringstuff.com/files/rj.txt') |
||||||
|
print(type(res)) |
||||||
|
|
||||||
|
if res.status_code == requests.codes.ok: |
||||||
|
print(len(res.text)) |
||||||
|
print(res.text[:250]) |
@ -0,0 +1,13 @@ |
|||||||
|
import os |
||||||
|
import requests |
||||||
|
|
||||||
|
cwd = os.getcwd() |
||||||
|
print('Current working directory is: ', cwd) |
||||||
|
|
||||||
|
res = requests.get('https://automatetheboringstuff.com/files/rj.txt') |
||||||
|
res.raise_for_status() |
||||||
|
|
||||||
|
playFile = open(cwd + '\\web-scraping\\files\\RomeoAndJuli.txt', 'wb') |
||||||
|
for chunk in res.iter_content(10000): |
||||||
|
playFile.write(chunk) |
||||||
|
playFile.close() |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,2 @@ |
|||||||
|
import webbrowser |
||||||
|
webbrowser.open('https://chat.harmonyhealthmedical.com') |
@ -0,0 +1,23 @@ |
|||||||
|
|
||||||
|
# Required modules |
||||||
|
|
||||||
|
## Requests module |
||||||
|
The requests module is used to send HTTP requests. |
||||||
|
- [Python 3.7](https://www.python.org/downloads/) |
||||||
|
- [Requests](https://pypi.org/project/requests/) |
||||||
|
``` |
||||||
|
pip install requests |
||||||
|
``` |
||||||
|
|
||||||
|
## BeautifulSoup module |
||||||
|
The Beautiful Soup Python library is used to parse HTML and XML documents. |
||||||
|
- [BeautifulSoup4](https://pypi.org/project/beautifulsoup4/) |
||||||
|
``` |
||||||
|
pip install beautifulsoup4 |
||||||
|
``` |
||||||
|
|
||||||
|
## Selenium module |
||||||
|
The selenium module is used to automate web browsers. |
||||||
|
- [Python 3.7](https://www.python.org/downloads/) |
||||||
|
- [Selenium](https://pypi.org/project/selenium/) |
||||||
|
|
Loading…
Reference in new issue