Skip to content

Commit c71924e

Browse files
authored
Update README.md
1 parent 5098c26 commit c71924e

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<p align="center">
2-
<a href="https://dashboard.smartproxy.com/?page=residential-proxies&utm_source=socialorganic&utm_medium=social&utm_campaign=resi_trial_GITHUB"><img src="https://i.imgur.com/opsHIEZ.png"</a>
2+
<a href="https://dashboard.decodo.com/?page=residential-proxies&utm_source=socialorganic&utm_medium=social&utm_campaign=resi_trial_GITHUB"><img src="https://github.com/user-attachments/assets/60bb48bd-8dcc-48b2-82c9-a218e1e4449c"></a>
33
</p>
44

5-
[![](https://dcbadge.vercel.app/api/server/gvJhWJPaB4)](https://discord.gg/sCr34yVDVB)
6-
75
<p align="center">
8-
<a href="https://github.com/Smartproxy/Smartproxy"> :house: Main Repository :house: </a>
6+
<a href="https://github.com/Decodo/Decodo"> Main Repository </a>
97
</p>
108

119
## Table of contents
@@ -23,7 +21,7 @@
2321

2422
## Disclaimer
2523

26-
The following tutorial is meant for educational purposes and introduces the basics of building a web scraping project using Smartproxy proxies. You can read more about the [Requests](https://requests.readthedocs.io/en/master/user/quickstart/) and [BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/) libraries in their documentation to learn more about them and build upon this example.
24+
The following tutorial is meant for educational purposes and introduces the basics of building a web scraping project using Decodo proxies. You can read more about the [Requests](https://requests.readthedocs.io/en/master/user/quickstart/) and [BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/) libraries in their documentation to learn more about them and build upon this example.
2725

2826
## What is web scraping with Python?
2927

@@ -44,13 +42,13 @@ To run the example scraper, you're going to need [Python](https://www.python.org
4442
To install the scraper example, run the following:
4543

4644
```
47-
git clone https://github.com/Smartproxy/Python-scraper-tutorial.git
45+
git clone https://github.com/Decodo/Python-scraper-tutorial.git
4846
```
4947

5048
or
5149

5250
```
53-
curl https://raw.githubusercontent.com/Smartproxy/Python-scraper-tutorial/master/scraper.py > scraper.py
51+
curl https://raw.githubusercontent.com/Decodo/Python-scraper-tutorial/master/scraper.py > scraper.py
5452
```
5553

5654
## Be polite
@@ -87,7 +85,7 @@ Once you know exactly what you want from the site, you can inspect those element
8785

8886
The Chrome DevTools will open and display the HTML structure of the page. You can manually search for the item you need or use the element picker tool in the top-left corner. Select it, hover over the item you need in the page and it'll find it in the HTML code. After a quick inspection, you can see that the main information on each book is located in the article element with a class name **product_pod**.
8987

90-
![ezgif-5-718c9a2060](https://github.com/Smartproxy/Python-scraper-tutorial/assets/159907476/e229d3f4-1512-42ab-8390-e47a5fdecc5c)
88+
![ezgif-5-718c9a2060](https://github.com/Decodo/Python-scraper-tutorial/assets/159907476/e229d3f4-1512-42ab-8390-e47a5fdecc5c)
9189

9290

9391
All of the data you'll need is nested in the **article** element. Now, let's inspect the price. We can see that the price value is the text of the paragraph with the **price_color** class. If you inspect the In stock part, you can see that it's a text value of the **instock availability** paragraph. You can check out other elements on the page and see how they're represented in the HTML. Once you're done, let's build a simple web scraper to extract this data through code.
@@ -110,20 +108,20 @@ Then, you'll need to write a GET request to retrieve the contents of the site. A
110108
The ```requests.get``` function has only one required argument: the URL of the site you're targeting. However, you must pass in an additional proxy parameter because you'll want to use a proxy to reach the content. Declare these variables above your ```requests.get``` statement.
111109

112110
```python
113-
proxy = {'http': 'http://username:password@gate.smartproxy.com:10000'}
111+
proxy = {'http': 'http://username:password@gate.decodo.com:10000'}
114112
url = 'http://books.toscrape.com/'
115113
r = requests.get(url, proxies=proxy)
116114
```
117115

118-
For the proxy, you first need to specify its kind, in this case, HTTP. Then, you have to enter the Smartproxy username and password, separated by a colon, and the endpoint you'll be using to connect to the proxy server. In this example, we're using residential proxies. You can get this information from the dashboard by following these steps:
116+
For the proxy, you first need to specify its kind, in this case, HTTP. Then, you have to enter the Decodo username and password, separated by a colon, and the endpoint you'll be using to connect to the proxy server. In this example, we're using residential proxies. You can get this information from the dashboard by following these steps:
119117
1. Open the proxy setup tab.
120118
2. Navigate to the Endpoint generator.
121119
3. Configure the parameters according to your needs. Set your authentication method, location, session type, and protocol.
122120
4. Select the number of proxy endpoints you want to generate (you'll only need 1 for now).
123121
5. Copy the endpoint(s).
124122

125123
<p align="center">
126-
<a href="https://smartproxy.com/"><img src="https://i.imgur.com/M2J00E4.png"></a>
124+
<a href="https://Decodo.com/"><img src="https://i.imgur.com/M2J00E4.png"></a>
127125
</p>
128126

129127
The ```url``` parameter is simply the address of the site you want to scrape.
@@ -137,7 +135,7 @@ The code so far should look like this:
137135
```python
138136
import requests
139137
from bs4 import BeautifulSoup
140-
proxy = {'http': 'http://username:password@gate.smartproxy.com:10000'}
138+
proxy = {'http': 'http://username:password@gate.decodo.com:10000'}
141139
url = 'http://books.toscrape.com/'
142140
r = requests.get(url, proxies=proxy)
143141
print(r.content)
@@ -293,6 +291,6 @@ In this article, you've learned how to write a simple scraper script to get info
293291
## Contact
294292
If you need any help or get stuck, feel free to contact us using one of the methods provided:
295293

296-
Email - sales@smartproxy.com
294+
Email - sales@decodo.com
297295

298296
<a href="https://direct.lc.chat/12092754/">Live chat 24/7</a>

0 commit comments

Comments
 (0)