libgenrs 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: libgenrs
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Asynchronous python lib for Libgen.rs
5
5
  Home-page: https://github.com/ramanveerji/libgenrs
6
- Download-URL: https://github.com/ramanveerji/libgenrs/archive/v0.2.0.tar.gz
6
+ Download-URL: https://github.com/ramanveerji/libgenrs/archive/v0.2.2.tar.gz
7
7
  License: MIT License
8
8
  Classifier: Intended Audience :: Developers
9
9
  Classifier: Operating System :: OS Independent
@@ -133,7 +133,7 @@ The returned data looks like this: (The dict key is the Libgen id of the book)
133
133
  'btih': '84195af51fa738cb232297dd1376df6d8b8313be',
134
134
  'mirrors':
135
135
  {
136
- 'main': 'http://library.lol/main/a382109f7fdde3be5b2cb4f82d97443b',
136
+ 'main': 'http://library.gift/main/a382109f7fdde3be5b2cb4f82d97443b',
137
137
  'libgen.lc': 'http://libgen.lc/ads.php?md5=a382109f7fdde3be5b2cb4f82d97443b',
138
138
  'z-library': 'http://b-ok.cc/md5/a382109f7fdde3be5b2cb4f82d97443b',
139
139
  'libgen.pw': 'https://libgen.pw/item?id=881061',
@@ -111,7 +111,7 @@ The returned data looks like this: (The dict key is the Libgen id of the book)
111
111
  'btih': '84195af51fa738cb232297dd1376df6d8b8313be',
112
112
  'mirrors':
113
113
  {
114
- 'main': 'http://library.lol/main/a382109f7fdde3be5b2cb4f82d97443b',
114
+ 'main': 'http://library.gift/main/a382109f7fdde3be5b2cb4f82d97443b',
115
115
  'libgen.lc': 'http://libgen.lc/ads.php?md5=a382109f7fdde3be5b2cb4f82d97443b',
116
116
  'z-library': 'http://b-ok.cc/md5/a382109f7fdde3be5b2cb4f82d97443b',
117
117
  'libgen.pw': 'https://libgen.pw/item?id=881061',
@@ -1,7 +1,7 @@
1
1
  import logging
2
2
  from .search import Libgen
3
3
 
4
- __version__ = '0.2.0'
4
+ __version__ = '0.2.2'
5
5
  logging.basicConfig(
6
6
  level=logging.INFO,
7
7
  format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
@@ -15,7 +15,7 @@ logg = logging.getLogger(__name__)
15
15
  class LibgenDownload:
16
16
  def __init__(self) -> None:
17
17
  self.dest_folder = Path.cwd()
18
- self.mirrors = ['library.lol', 'libgen.lc', 'libgen.gs', 'b-ok.cc']
18
+ self.mirrors = ['library.gift', 'libgen.lc', 'libgen.gs', 'b-ok.cc']
19
19
  self.regex = re.compile(
20
20
  r'^(?:http|ftp)s?://' # http:// or https:// domain...
21
21
  r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|'
@@ -103,7 +103,7 @@ class LibgenDownload:
103
103
 
104
104
  domain = str(tld.domain) + '.' + str(tld.suffix)
105
105
  direct_links = []
106
- if domain == 'library.lol':
106
+ if domain == 'library.gift':
107
107
  div = soup.find('div', attrs={'id': 'download'})
108
108
  for li in div.ul.findAll('li'):
109
109
  direct_links.append(li.a['href'])
@@ -257,7 +257,7 @@ class Libgen:
257
257
  data[res_id]['mirrors'] = {}
258
258
 
259
259
  data[res_id]['mirrors'][
260
- 'main'] = f'http://library.lol/main/{md5}'
260
+ 'main'] = f'http://library.gift/main/{md5}'
261
261
 
262
262
  data[res_id]['mirrors'][
263
263
  'libgen.lc'] = f'http://libgen.lc/ads.php?md5={md5}'
@@ -302,7 +302,7 @@ class Libgen:
302
302
  dest_folder: Path = None,
303
303
  progress: Optional[Callable[..., Awaitable[None]]] = None,
304
304
  progress_args: list = []) -> Path:
305
- """Download the book from support mirro: 'library.lol', 'libgen.lc', 'libgen.gs', 'b-ok.cc'
305
+ """Download the book from support mirro: 'library.gift', 'libgen.lc', 'libgen.gs', 'b-ok.cc'
306
306
 
307
307
 
308
308
  Args:
@@ -5,11 +5,11 @@ from urllib.parse import unquote_plus
5
5
  class Util:
6
6
  @staticmethod
7
7
  async def get_filename(con_disp: str) -> str:
8
-
8
+ if con_disp is None:
9
+ return "unknown_filename"
9
10
  fname = re.findall("filename\*=([^;]+)", con_disp, flags=re.IGNORECASE)
10
11
  if not fname:
11
- fname = re.findall(
12
- "filename=([^;]+)", con_disp, flags=re.IGNORECASE)
12
+ fname = re.findall("filename=([^;]+)", con_disp, flags=re.IGNORECASE)
13
13
  if "utf-8''" in fname[0].lower():
14
14
  fname = re.sub("utf-8''", '', fname[0], flags=re.IGNORECASE)
15
15
  fname = unquote_plus(fname)
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: libgenrs
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Asynchronous python lib for Libgen.rs
5
5
  Home-page: https://github.com/ramanveerji/libgenrs
6
- Download-URL: https://github.com/ramanveerji/libgenrs/archive/v0.2.0.tar.gz
6
+ Download-URL: https://github.com/ramanveerji/libgenrs/archive/v0.2.2.tar.gz
7
7
  License: MIT License
8
8
  Classifier: Intended Audience :: Developers
9
9
  Classifier: Operating System :: OS Independent
@@ -133,7 +133,7 @@ The returned data looks like this: (The dict key is the Libgen id of the book)
133
133
  'btih': '84195af51fa738cb232297dd1376df6d8b8313be',
134
134
  'mirrors':
135
135
  {
136
- 'main': 'http://library.lol/main/a382109f7fdde3be5b2cb4f82d97443b',
136
+ 'main': 'http://library.gift/main/a382109f7fdde3be5b2cb4f82d97443b',
137
137
  'libgen.lc': 'http://libgen.lc/ads.php?md5=a382109f7fdde3be5b2cb4f82d97443b',
138
138
  'z-library': 'http://b-ok.cc/md5/a382109f7fdde3be5b2cb4f82d97443b',
139
139
  'libgen.pw': 'https://libgen.pw/item?id=881061',
File without changes
File without changes
File without changes
File without changes
File without changes