File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ 0.3.1
Original file line number Diff line number Diff line change 1+ import os
12import platform
23import sys
34from typing import List , Optional
@@ -19,7 +20,9 @@ class ScrapingAntClient:
1920 def __init__ (self , token : str ):
2021 self .token = token
2122 self .requests_session = requests .Session ()
22- user_agent = f'ScrapingAntClient ({ sys .platform } ; Python/{ platform .python_version ()} );'
23+ version_file = open (os .path .join ('scrapingant_client' , 'VERSION' ))
24+ version = version_file .read ().strip ()
25+ user_agent = f'ScrapingAnt Client/{ version } ({ sys .platform } ; Python/{ platform .python_version ()} );'
2326 self .requests_session .headers .update ({
2427 'x-api-key' : self .token ,
2528 'User-Agent' : user_agent ,
Original file line number Diff line number Diff line change 1+ import os
2+
13import setuptools
24
35with open ("README.md" , "r" , encoding = "utf-8" ) as fh :
46 long_description = fh .read ()
57
8+ version_file = open (os .path .join ('scrapingant_client' , 'VERSION' ))
9+ version = version_file .read ().strip ()
10+
611setuptools .setup (
712 name = "scrapingant-client" ,
8- version = "0.3.0" ,
13+ version = version ,
914 author = "andrii.kovalenko" ,
1015 author_email = "adrekoval@gmail.com" ,
1116 license = 'Apache-2.0' ,
You can’t perform that action at this time.
0 commit comments