You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* A [Wiley Online Library](https://onlinelibrary.wiley.com/) (WOL) Account
63
63
* A TDM API Token, available from the WOL [TDM resources page](https://onlinelibrary.wiley.com/library-info/resources/text-and-datamining) using your WOL Account
64
64
* Access to the content you wish to download
65
-
* Access will be determined via your IP address
65
+
* Access will be determined via your [public IP address](https://api.ipify.org/?format=json)
66
66
67
67
## Quick Start
68
68
69
69
### Environment Variables
70
70
71
71
Set the environment variable `TDM_API_TOKEN` to your API token:
72
72
73
+
Linux example
73
74
```bash
74
75
# Set your TDM API token (required)
75
-
export TDM_API_TOKEN='your-tdm-api-token'
76
+
export TDM_API_TOKEN='your-api-token-here'
76
77
echo$TDM_API_TOKEN
77
78
```
78
79
@@ -90,57 +91,70 @@ source venv/bin/activate
90
91
91
92
# Verify installation
92
93
(venv) $ pip list | grep wiley-tdm
93
-
94
-
# Deactivate virtual environment (you can keep it open)
95
-
(venv) $ deactivate
96
94
```
97
95
98
96
### Basic Usage
99
97
100
-
The following example will download a single Open Access Article PDF to a 'downloads' folder,
101
-
relative to your current working directory, and name the file `<doi>`.pdf.
102
-
103
-
Create example1.py (Copy or [download](examples/example1.py))
98
+
The following examples will download Article PDFs to a 'downloads' directory,
99
+
relative to your current working directory, and name the files `<doi>`.pdf. Run all code in your [Virtual Environment](#install).
In most troubleshooting scenarios it can be helpful to generate a report:
130
126
131
-
# Deactivate when done
132
-
(venv) $ deactivate
127
+
```
128
+
# Save the download results to a CSV file: 'results.csv'
129
+
tdm.save_download_results()
133
130
```
134
131
135
-
See more [examples](examples/).
132
+
### Installation
136
133
137
-
## Troubleshooting
134
+
If you encounter installation issues:
135
+
136
+
```bash
137
+
# Ensure you're using Python 3.9+
138
+
python3 --version
139
+
140
+
# Update pip to latest version
141
+
python3 -m pip install --upgrade pip
142
+
```
143
+
144
+
Alternatively, try installing a fresh [Virtual Environment](#install).
145
+
146
+
If problems persist, please [open an issue](https://github.com/WileyLabs/tdm-client/issues) with:
147
+
- Your Python version
148
+
- The exact error message
149
+
- Your operating system details
138
150
139
151
### Access denied
140
152
141
-
Check you can manually view the desired content directly on [Wiley Online Library](https://onlinelibrary.wiley.com/).
153
+
Check access directly on [Wiley Online Library](https://onlinelibrary.wiley.com/).
154
+
- If access denied: contact your Institution/Wiley and check your subscription is active.
155
+
- If access granted: ensure you are accessing the TDM API from a known IP address (see below).
142
156
143
-
If you can, it is possible that the IP address you are accessing the website from is different to where you are running your TDM code. Observe your IP address in the TDM console log and compare to the IP address in your [browser](https://api.ipify.org?format=json).
157
+
It is possible that the IP address you are accessing WOL from is different to where you are running your TDM code. Observe your IP address in the TDM console log and compare to the IP address in your [browser](https://api.ipify.org?format=json).
144
158
145
159
Example console output:
146
160
```
@@ -151,45 +165,16 @@ Example Browser output:
151
165
152
166
```json
153
167
// https://api.ipify.org/?format=json
154
-
155
168
{
156
169
"ip": "XX.XX.XX.XX"
157
170
}
158
171
```
159
172
160
-
### Installation Issues
161
-
162
-
If you encounter issues during installation, ensure you have the correct version of Python and the required packages. You can also try reinstalling the package:
163
-
164
-
```bash
165
-
# Activate virtual environment
166
-
source venv/bin/activate
167
-
168
-
# Uninstall package
169
-
(venv) $ pip uninstall wiley-tdm
170
-
171
-
# Install package
172
-
(venv) $ pip install wiley-tdm
173
-
174
-
# Verify installation
175
-
(venv) $ pip list | grep wiley-tdm
176
-
177
-
# Deactivate virtual environment
178
-
(venv) $ deactivate
179
-
```
173
+
If problems persist, please contact: tdm@wiley.com
180
174
181
175
## Contributing
182
176
183
-
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to:
184
-
185
-
- Set up your development environment
186
-
- Run tests
187
-
- Submit pull requests
188
-
189
-
Please ensure your PR includes:
190
-
- Clear description of changes
191
-
- Updated documentation
192
-
- Test cases if applicable
177
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for further details.
0 commit comments