mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2025-02-23 21:01:24 +00:00
Compare commits
2 Commits
e7dfaf8b8b
...
33a7e5adc6
Author | SHA1 | Date | |
---|---|---|---|
33a7e5adc6 | |||
1a96b1a2aa |
@ -23,7 +23,7 @@ class BedetequeScraper:
|
|||||||
:return: CSRF token
|
:return: CSRF token
|
||||||
"""
|
"""
|
||||||
response = self.session.get(self.referer).content.decode()
|
response = self.session.get(self.referer).content.decode()
|
||||||
regex = r'csrf_token_bedetheque\"\s*value=\"(\w*)\"'
|
regex = r'csrf_token_bel\"\s*value=\"(\w*)\"'
|
||||||
return re.search(regex, response).group(1)
|
return re.search(regex, response).group(1)
|
||||||
|
|
||||||
def search_by_isbn(self, isbn: str) -> [str]:
|
def search_by_isbn(self, isbn: str) -> [str]:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% include "django/forms/widgets/input.html" %}
|
{% include "django/forms/widgets/input.html" %}
|
||||||
<input type="button" value="{% trans "Fetch data and add another" %}" name="_isbn_addanother" onclick="form.submit()">
|
<input type="submit" value="{% trans "Fetch data and add another" %}" name="_isbn_addanother" onclick="form.submit()">
|
||||||
<input type="button" value="{% trans "Fetch only" %}" name="_isbn" onclick="form.submit()">
|
<input type="submit" value="{% trans "Fetch only" %}" name="_isbn" onclick="form.submit()">
|
Loading…
x
Reference in New Issue
Block a user