Skip to content

Commit 88274d7

Browse files
author
pgaref
committed
Merge branch 'release/1.0.1'
2 parents b9766d8 + 9df1bd1 commit 88274d7

23 files changed

Lines changed: 165 additions & 66 deletions

.travis.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
language: python
22
python:
3-
- 2.7
3+
- "2.7"
4+
- "3.3"
5+
- "3.4"
6+
- "3.5"
7+
- "3.6"
48
sudo: false
9+
before_install:
10+
- python --version
11+
- uname -a
12+
- lsb_release -a
513
# command to install dependencies
614
install:
715
- "pip install -r requirements.txt"
816
- "pip install coverage"
917
- "pip install coveralls"
1018
script:
11-
- "coverage run --source=http setup.py test"
19+
- "coverage run --source=http_request_randomizer setup.py test"
1220
after_success:
1321
coveralls

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,35 +34,40 @@ I have to mention that for each request a different agent header is used. The di
3434
## How to use
3535

3636
The project is now distribured as a PyPI package!
37-
To run an example simply include **http-request-randomizer==0.0.5** in your requirements.txt file.
37+
To run an example simply include **http-request-randomizer==1.0.1** in your requirements.txt file.
3838
Then run the code below:
3939

4040
````python
4141
import time
42-
from http.requests.proxy.requestProxy import RequestProxy
42+
from http_request_randomizer.requests.proxy.requestProxy import RequestProxy
4343

4444
if __name__ == '__main__':
45-
print "Hello"
45+
4646
start = time.time()
4747
req_proxy = RequestProxy()
4848
print "Initialization took: {0} sec".format((time.time() - start))
4949
print "Size : ", len(req_proxy.get_proxy_list())
5050
print " ALL = ", req_proxy.get_proxy_list()
5151

52-
test_url = 'http://icanhazip.com'
52+
test_url = 'http://ipv4.icanhazip.com'
5353

5454
while True:
5555
start = time.time()
5656
request = req_proxy.generate_proxied_request(test_url)
5757
print "Proxied Request Took: {0} sec => Status: {1}".format((time.time() - start), request.__str__())
5858
if request is not None:
59-
print "\t Response: ip={0}".format(request.text)
59+
print "\t Response: ip={0}".format(u''.join(request.text).encode('utf-8'))
6060
print "Proxy List Size: ", len(req_proxy.get_proxy_list())
6161

6262
print"-> Going to sleep.."
6363
time.sleep(10)
6464
````
6565

66+
## Documentation
67+
68+
[http-request-randomizer documentation](http://pythonhosted.org/http-request-randomizer)
69+
70+
6671
## Contributing
6772

6873
Contributions are always welcome! Feel free to send a pull request.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

http/requests/parsers/FreeProxyParser.py renamed to http_request_randomizer/requests/parsers/FreeProxyParser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import requests
44
from bs4 import BeautifulSoup
55

6-
from http.requests.parsers.UrlParser import UrlParser
6+
from http_request_randomizer.requests.parsers.UrlParser import UrlParser
77

88
logger = logging.getLogger(__name__)
99
__author__ = 'pgaref'

http/requests/parsers/ProxyForEuParser.py renamed to http_request_randomizer/requests/parsers/ProxyForEuParser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import requests
44
from bs4 import BeautifulSoup
55

6-
from http.requests.parsers.UrlParser import UrlParser
6+
from http_request_randomizer.requests.parsers.UrlParser import UrlParser
77

88
logger = logging.getLogger(__name__)
99
__author__ = 'pgaref'

0 commit comments

Comments
 (0)