### Installing Scholarly from PyPI Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This command installs the Scholarly package from the Python Package Index (PyPI) using pip. It allows users to quickly integrate the Scholarly library into their Python environment. ```bash pip3 install scholarly ``` -------------------------------- ### Installing Scholarly from GitHub Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This command installs the Scholarly package directly from its GitHub repository using pip. This allows users to access the latest development version of the package. ```bash pip install git+https://github.com/scholarly-python-package/scholarly.git ``` -------------------------------- ### Creating .env file for testing Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code creates a `.env` file in the working directory. ```bash touch .env ``` -------------------------------- ### Setting connection method in .env file Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code sets the connection method in the `.env` file. ```bash CONNECTION_METHOD = luminati ``` -------------------------------- ### Using Luminati Proxy with Configuration Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet shows how to configure and use the Luminati proxy service with the scholarly package, providing username, password, and port. ```python success = pg.Luminati(usr= "your_username",passwd ="your_password", port = "your_port" ) ``` -------------------------------- ### Setting Luminati credentials in .env file Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code sets the Luminati credentials in the `.env` file. ```bash USERNAME = PASSWORD = PORT = ``` -------------------------------- ### Creating ProxyGenerator Object Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to create an instance of the ProxyGenerator class. This is a necessary step before configuring and using a proxy. ```python pg = ProxyGenerator() ``` -------------------------------- ### Using Proxy for All Requests Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet shows how to force all requests to go through the configured proxy by passing the ProxyGenerator object twice to the `use_proxy` function. ```python scholarly.use_proxy(pg, pg) ``` -------------------------------- ### Searching by Keyword Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code searches for authors by keyword ('Haptics') using `scholarly.search_keyword` and prints the information of the first author found using `scholarly.pprint`. ```python >>> search_query = scholarly.search_keyword('Haptics') >>> scholarly.pprint(next(search_query)) {'affiliation': 'Postdoctoral research assistant, University of Bremen', 'citedby': 56666, 'email_domain': '@collision-detection.com', 'filled': False, 'interests': ['Computer Graphics', 'Collision Detection', 'Haptics', 'Geometric Data Structures'], 'name': 'Rene Weller', 'scholar_id': 'lHrs3Y4AAAAJ', 'source': 'SEARCH_AUTHOR_SNIPPETS', 'url_picture': 'https://scholar.google.com/citations?view_op=medium_photo&user=lHrs3Y4AAAAJ'} ``` -------------------------------- ### Configuring Internal Tor Proxy with Scholarly in Python Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet shows how to configure Scholarly to launch and use its own Tor process. It requires you to have Tor installed locally and pass the path to the Tor executable. Replace `tor` with the actual path to your Tor executable if it's not in your system's PATH. ```python from scholarly import scholarly, ProxyGenerator pg = ProxyGenerator() success = pg.Tor_Internal(tor_cmd = "tor") scholarly.use_proxy(pg) author = next(scholarly.search_author('Steven A Cholewiak')) scholarly.pprint(author) ``` -------------------------------- ### Routing Query Through Luminati Proxy Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to route a query through the Luminati proxy after it has been configured. It searches for an author and prints the author's information. ```python scholarly.use_proxy(pg) author = next(scholarly.search_author('Steven A Cholewiak')) scholarly.pprint(author) ``` -------------------------------- ### Editing .env file for testing Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code edits the `.env` file using nano. ```bash nano .env # or any editor of your choice ``` -------------------------------- ### Using Luminati Proxy with Environment Variables Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to use Luminati proxy with environment variables for username, password, and port. It retrieves these values from the environment using `os.getenv`. ```python import os pg.Luminati(usr=os.getenv("USERNAME"),passwd=os.getenv("PASSWORD"),proxy_port = os.getenv("PORT")) ``` -------------------------------- ### Routing Query Through ScraperAPI Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to route a query through the ScraperAPI proxy after it has been configured. It searches for an author and prints the author's information. ```python scholarly.use_proxy(pg) author = next(scholarly.search_author('Steven A Cholewiak')) scholarly.pprint(author) ``` -------------------------------- ### Install scholarly package from GitHub using pip Source: https://github.com/scholarly-python-package/scholarly/blob/main/README.md Installs the scholarly package directly from the GitHub repository using pip. This allows you to get the latest development version. ```bash pip3 install -U git+https://github.com/scholarly-python-package/scholarly.git ``` -------------------------------- ### Install scholarly package using pip Source: https://github.com/scholarly-python-package/scholarly/blob/main/README.md Installs the scholarly package using pip from PyPI. This is an alternative installation method to conda. ```bash pip3 install scholarly ``` -------------------------------- ### Importing Scholarly and ProxyGenerator Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet shows how to import the scholarly package and the ProxyGenerator class, which are necessary for using proxies with scholarly. ```python from scholarly import scholarly, ProxyGenerator ``` -------------------------------- ### Using ScraperAPI Proxy Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to configure and use the ScraperAPI proxy service with the scholarly package. It requires providing a ScraperAPI key. ```python success = pg.ScraperAPI(YOUR_SCRAPER_API_KEY) ``` -------------------------------- ### Initializing ProxyGenerator Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet shows how to import and initialize the ProxyGenerator class from the scholarly package. This class is used to handle different types of proxy connections. ```python from scholarly import ProxyGenerator ``` -------------------------------- ### Install scholarly package using conda Source: https://github.com/scholarly-python-package/scholarly/blob/main/README.md Installs the scholarly package using conda from the conda-forge channel. This is one of the recommended methods for installing the package. ```bash conda install -c conda-forge scholarly ``` -------------------------------- ### Using ScraperAPI with Additional Options Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet shows how to use ScraperAPI with additional options like country code, premium, and render, which may be available depending on the ScraperAPI plan. ```python success = pg.ScraperAPI(YOUR_SCRAPER_API_KEY, country_code='fr', premium=True, render=True) ``` -------------------------------- ### Install scholarly package with Tor support Source: https://github.com/scholarly-python-package/scholarly/blob/main/README.md Installs the scholarly package with optional Tor dependencies using pip. This enables the use of Tor proxies for circumventing anti-bot measures. Note: Tor option is unavailable with conda installation. ```bash pip3 install scholarly[tor] ``` -------------------------------- ### Install scholarly package with Tor support (zsh) Source: https://github.com/scholarly-python-package/scholarly/blob/main/README.md Installs the scholarly package with optional Tor dependencies using pip, specifically for users of the zsh shell. This is necessary due to zsh's handling of square brackets. ```zsh pip3 install scholarly'[tor]' ``` -------------------------------- ### Initializing Free Proxy with Scholarly in Python Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to initialize and use a free proxy with the Scholarly library. It utilizes the ProxyGenerator class to fetch free proxies and then configures Scholarly to use them for making requests. It requires the `free-proxy` pip library. ```python from scholarly import scholarly, ProxyGenerator pg = ProxyGenerator() success = pg.FreeProxies() scholarly.use_proxy(pg) author = next(scholarly.search_author('Steven A Cholewiak')) scholarly.pprint(author) ``` -------------------------------- ### Cloning Scholarly from GitHub Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This command clones the Scholarly package's GitHub repository to the local machine using git. This allows users to directly modify the source code and contribute to the project. ```bash git clone https://github.com/scholarly-python-package/scholarly.git ``` -------------------------------- ### Searching for an Author by Name Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code searches for an author by name ('Marty Banks, Berkeley') using `scholarly.search_author` and prints the author's information using `scholarly.pprint`. ```python >>> search_query = scholarly.search_author('Marty Banks, Berkeley') >>> scholarly.pprint(next(search_query)) {'affiliation': 'Professor of Vision Science, UC Berkeley', 'citedby': 21074, 'email_domain': '@berkeley.edu', 'filled': False, 'interests': ['vision science', 'psychology', 'human factors', 'neuroscience'], 'name': 'Martin Banks', 'scholar_id': 'Smr99uEAAAAJ', 'source': 'SEARCH_AUTHOR_SNIPPETS', 'url_picture': 'https://scholar.google.com/citations?view_op=medium_photo&user=Smr99uEAAAAJ'} ``` -------------------------------- ### Using Single Proxy Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet shows how to configure the ProxyGenerator to use a single proxy with specified HTTP and HTTPS addresses. The `SingleProxy` method returns True if the proxy is set up successfully. ```python success = pg.SingleProxy(http = , https = ) ``` -------------------------------- ### Setting Scholarly to Use Proxy Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to set the scholarly package to use the configured proxy. The `use_proxy` function is used to apply the proxy settings. ```python scholarly.use_proxy(pg) ``` -------------------------------- ### Filling Author Information with Scholarly Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to search for an author by name using the scholarly package and then fill the author's profile with additional information. It retrieves the first author from the search results and populates the profile with basic information, citation indices, and co-authors. ```python >>> search_query = scholarly.search_author('Steven A Cholewiak') >>> author = next(search_query) >>> scholarly.pprint(scholarly.fill(author, sections=['basics', 'indices', 'coauthors'])) {'affiliation': 'Vision Scientist', 'citedby': 304, 'citedby5y': 226, 'coauthors': [{'affiliation': 'Kurt Koffka Professor of Experimental ' 'Psychology, University of Giessen', 'filled': False, 'name': 'Roland Fleming', 'scholar_id': 'ruUKktgAAAAJ', 'source': 'CO_AUTHORS_LIST'}, {'affiliation': 'Professor of Vision Science, UC Berkeley', 'filled': False, 'name': 'Martin Banks', 'scholar_id': 'Smr99uEAAAAJ', 'source': 'CO_AUTHORS_LIST'}, {'affiliation': 'Durham University, Computer Science & Physics', 'filled': False, 'name': 'Gordon D. Love', 'scholar_id': '3xJXtlwAAAAJ', 'source': 'CO_AUTHORS_LIST'}, {'affiliation': 'Professor of ECE, Purdue University', 'filled': False, 'name': 'Hong Z Tan', 'scholar_id': 'OiVOAHMAAAAJ', 'source': 'CO_AUTHORS_LIST'} ``` -------------------------------- ### Running Without Proxy Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to disable the proxy and run scholarly without any proxy by re-initializing the ProxyGenerator and calling `use_proxy` with the new object twice. ```python pg = ProxyGenerator() scholarly.use_proxy(pg, pg) ``` -------------------------------- ### Searching for an Author Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to search for an author by name using the `scholarly` library. It imports the library and then prints the information of the first author found with the specified name. ```python from scholarly import scholarly print(next(scholarly.search_author('Steven A. Cholewiak'))) ``` -------------------------------- ### Searching for an Author by ID Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code searches for an author by their Google Scholar ID ('Smr99uEAAAAJ') using `scholarly.search_author_id` and prints the author's information using `scholarly.pprint`. ```python >>> author = scholarly.search_author_id('Smr99uEAAAAJ') >>> scholarly.pprint(author) {'affiliation': 'Professor of Vision Science, UC Berkeley', 'email_domain': '@berkeley.edu', 'filled': False, 'homepage': 'http://bankslab.berkeley.edu/', 'interests': ['vision science', 'psychology', 'human factors', 'neuroscience'], 'name': 'Martin Banks', 'organization': 11816294095661060495, 'scholar_id': 'Smr99uEAAAAJ', 'source': 'AUTHOR_PROFILE_PAGE'} ``` -------------------------------- ### Searching Publications with Scholarly Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to search for publications using the scholarly package based on a given search query. It retrieves the first result from the search and prints its details, including author information, publication details, and citation information. ```python >>> search_query = scholarly.search_pubs('Perception of physical stability and center of mass of 3D objects') >>> scholarly.pprint(next(search_query)) {'author_id': ['4bahYMkAAAAJ', 'ruUKktgAAAAJ', ''], 'bib': {'abstract': 'Humans can judge from vision alone whether an object is ' 'physically stable or not. Such judgments allow observers ' 'to predict the physical behavior of objects, and hence ' 'to guide their motor actions. We investigated the visual ' 'estimation of physical stability of 3-D objects (shown ' 'in stereoscopically viewed rendered scenes) and how it ' 'relates to visual estimates of their center of mass ' '(COM). In Experiment 1, observers viewed an object near ' 'the edge of a table and adjusted its tilt to the ' 'perceived critical angle, ie, the tilt angle at which ' 'the object', 'author': ['SA Cholewiak', 'RW Fleming', 'M Singh'], 'pub_year': '2015', 'title': 'Perception of physical stability and center of mass of 3-D ' 'objects', 'venue': 'Journal of vision'}, 'citedby_url': '/scholar?cites=15736880631888070187&as_sdt=5,33&sciodt=0,33&hl=en', 'eprint_url': 'https://jov.arvojournals.org/article.aspx?articleID=2213254', 'filled': False, 'gsrank': 1, 'num_citations': 23, 'pub_url': 'https://jov.arvojournals.org/article.aspx?articleID=2213254', 'source': 'PUBLICATION_SEARCH_SNIPPET', 'url_add_sclib': '/citations?hl=en&xsrf=&continue=/scholar%3Fq%3DPerception%2Bof%2Bphysical%2Bstability%2Band%2Bcenter%2Bof%2Bmass%2Bof%2B3D%2Bobjects%26hl%3Den%26as_sdt%3D0,33&citilm=1&json=&update_op=library_add&info=K8ZpoI6hZNoJ&ei=kiahX9qWNs60mAHIspTIBA', 'url_scholarbib': '/scholar?q=info:K8ZpoI6hZNoJ:scholar.google.com/&output=cite&scirp=0&hl=en'} ``` -------------------------------- ### Retrieving and Printing Author Profile and Publications Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code retrieves an author's profile, fills in the details, and prints the author's information. It then prints the titles of the author's publications and retrieves details of the first publication, followed by the titles of papers that cite the first publication. ```python from scholarly import scholarly # Retrieve the author's data, fill-in, and print search_query = scholarly.search_author('Steven A Cholewiak') author = scholarly.fill(next(search_query)) print(author) # Print the titles of the author's publications print([pub['bib']['title'] for pub in author['publications']]) # Take a closer look at the first publication pub = scholarly.fill(author['publications'][0]) print(pub) # Which papers cited that publication? print([citation['bib']['title'] for citation in scholarly.citedby(pub)]) ``` -------------------------------- ### Automodule Directive Example Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/ProxyGenerator.rst This snippet shows how to use the `automodule` directive in Sphinx to automatically generate documentation for a Python module. It includes options to display members and undocumented members. ```Sphinx .. automodule:: scholarly._proxy_generator :members: :undoc-members: ``` -------------------------------- ### Setting up Single Proxy with Scholarly in Python Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet shows how to configure Scholarly to use a single, user-defined proxy. It initializes a ProxyGenerator object, sets the proxy using the SingleProxy method, and then applies it to the Scholarly library. Replace `` and `` with your actual proxy addresses. ```python from scholarly import scholarly, ProxyGenerator pg = ProxyGenerator() success = pg.SingleProxy(http = , https = ) scholarly.use_proxy(pg) author = next(scholarly.search_author('Steven A Cholewiak')) scholarly.pprint(author) ``` -------------------------------- ### Exporting Publication to BibTeX Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to export a publication to BibTeX format using the scholarly package. It first searches for a publication and then uses the `bibtex` property to retrieve the BibTeX entry. ```python >>> query = scholarly.search_pubs("A density-based algorithm for discovering clusters in large spatial databases with noise") >>> pub = next(query) >>> scholarly.bibtex(pub) ``` -------------------------------- ### Run tests for scholarly package Source: https://github.com/scholarly-python-package/scholarly/blob/main/README.md Executes the test suite for the scholarly package using python3. This verifies that the installation was successful and that the package is functioning correctly. ```bash python3 test_module ``` -------------------------------- ### Searching for Authors by Organization ID Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code first searches for an organization ('Princeton University') to retrieve its ID, then searches for authors affiliated with that organization using `scholarly.search_author_by_organization`. The information of the first author found is then printed. ```python >>> scholarly.search_org('Princeton University') [{'Organization': 'Princeton University', 'id': '4836318610601440500'}] >>> search_query = scholarly.search_author_by_organization(4836318610601440500) >>> author = next(search_query) >>> scholarly.pprint(author) {'affiliation': 'Princeton University (Emeritus)', 'citedby': 438891, 'email_domain': '@princeton.edu', 'filled': False, 'interests': ['Daniel Kahneman'], 'name': 'Daniel Kahneman', 'scholar_id': 'ImhakoAAAAAJ', 'source': 'SEARCH_AUTHOR_SNIPPETS', 'url_picture': 'https://scholar.google.com/citations?view_op=medium_photo&user=ImhakoAAAAAJ'} ``` -------------------------------- ### Configuring External Tor Proxy with Scholarly in Python Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This code snippet demonstrates how to configure Scholarly to use an external Tor proxy. It assumes you have a Tor server running with a control port configured with a password. Replace `tor_sock_port`, `tor_control_port`, and `tor_password` with your Tor server's configuration. ```python from scholarly import scholarly, ProxyGenerator pg = ProxyGenerator() success = pg.Tor_External(tor_sock_port=9050, tor_control_port=9051, tor_password="scholarly_password") scholarly.use_proxy(pg) author = next(scholarly.search_author('Steven A Cholewiak')) scholarly.pprint(author) ``` -------------------------------- ### Author Data Structure Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/quickstart.rst This JSON snippet represents the structure of an author's data, including their name, affiliation, co-authors, research interests, and citation metrics. The 'co_authors' list contains dictionaries with information about each co-author, such as their name, affiliation, and Google Scholar ID. ```JSON [{ "affiliation": "Deepmind", "filled": false, "name": "Ari Weinstein", "scholar_id": "MnUboHYAAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Brigham and Women's Hospital/Harvard Medical " "School", "filled": false, "name": "Chia-Chien Wu", "scholar_id": "dqokykoAAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Professor of Psychology and Cognitive Science, " "Rutgers University", "filled": false, "name": "Jacob Feldman", "scholar_id": "KoJrMIAAAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Research Scientist at Google Research, PhD " "Student at UC Berkeley", "filled": false, "name": "Pratul Srinivasan", "scholar_id": "aYyDsZ0AAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Formerly: Indiana University, Rutgers " "University, University of Pennsylvania", "filled": false, "name": "Peter C. Pantelis", "scholar_id": "FoVvIK0AAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Professor in Computer Science, University of " "California, Berkeley", "filled": false, "name": "Ren Ng", "scholar_id": "6H0mhLUAAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Yale University", "filled": false, "name": "Steven W Zucker", "scholar_id": "rNTIQXYAAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Brown University", "filled": false, "name": "Ben Kunsberg", "scholar_id": "JPZWLKQAAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Rutgers University, New Brunswick, NJ", "filled": false, "name": "Manish Singh", "scholar_id": "9XRvM88AAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Silicon Valley Professor of ECE, Purdue " "University", "filled": false, "name": "David S. Ebert", "scholar_id": "fD3JviYAAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Clinical Director, Neurolens Inc.,", "filled": false, "name": "Vivek Labhishetty", "scholar_id": "tD7OGTQAAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "MIT", "filled": false, "name": "Joshua B. Tenenbaum", "scholar_id": "rRJ9wTJMUB8C", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Chief Scientist, isee AI", "filled": false, "name": "Chris Baker", "scholar_id": "bTdT7hAAAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Professor of Psychology, Ewha Womans " "University", "filled": false, "name": "Sung-Ho Kim", "scholar_id": "KXQb7CAAAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Assistant Professor, Boston University", "filled": false, "name": "Melissa M. Kibbe", "scholar_id": "NN4GKo8AAAAJ", "source": "CO_AUTHORS_LIST"}, {"affiliation": "Nvidia Corporation", "filled": false, "name": "Peter Shirley", "scholar_id": "nHx9IgYAAAAJ", "source": "CO_AUTHORS_LIST"}], "email_domain": "@berkeley.edu", "filled": false, "hindex": 9, "hindex5y": 9, "homepage": "http://steven.cholewiak.com/", "i10index": 8, "i10index5y": 7, "interests": ["Depth Cues", "3D Shape", "Shape from Texture & Shading", "Naive Physics", "Haptics"], "name": "Steven A. Cholewiak, PhD", "organization": 6518679690484165796, "scholar_id": "4bahYMkAAAAJ", "source": "SEARCH_AUTHOR_SNIPPETS" ``` -------------------------------- ### Search publications using proxy with scholarly Source: https://github.com/scholarly-python-package/scholarly/blob/main/README.md Demonstrates how to use the scholarly package with a proxy to search for publications. It sets up a ProxyGenerator object, configures free proxies, and then performs a search using scholarly.search_pubs. This is important to avoid IP blocking by Google Scholar. ```python from scholarly import ProxyGenerator # Set up a ProxyGenerator object to use free proxies # This needs to be done only once per session pg = ProxyGenerator() pg.FreeProxies() scholarly.use_proxy(pg) # Now search Google Scholar from behind a proxy search_query = scholarly.search_pubs('Perception of physical stability and center of mass of 3D objects') scholarly.pprint(next(search_query)) ``` -------------------------------- ### Run tests for scholarly package using unittest Source: https://github.com/scholarly-python-package/scholarly/blob/main/README.md Executes the test suite for the scholarly package using the unittest module in python3. This provides verbose output during the test execution. ```bash python3 -m unittest -v test_module.py ``` -------------------------------- ### Retrieve and print author data using scholarly Source: https://github.com/scholarly-python-package/scholarly/blob/main/README.md Demonstrates how to use the scholarly package to search for an author, retrieve the first result, fill in the author's details, and print the author's information. It uses the scholarly.search_author, next, scholarly.fill, and scholarly.pprint functions. ```python from scholarly import scholarly # Retrieve the author's data, fill-in, and print # Get an iterator for the author results search_query = scholarly.search_author('Steven A Cholewiak') # Retrieve the first result from the iterator first_author_result = next(search_query) scholarly.pprint(first_author_result) # Retrieve all the details for the author author = scholarly.fill(first_author_result ) scholarly.pprint(author) # Take a closer look at the first publication first_publication = author['publications'][0] first_publication_filled = scholarly.fill(first_publication) scholarly.pprint(first_publication_filled) # Print the titles of the author's publications publication_titles = [pub['bib']['title'] for pub in author['publications']] print(publication_titles) # Which papers cited that publication? citations = [citation['bib']['title'] for citation in scholarly.citedby(first_publication_filled)] print(citations) ``` -------------------------------- ### Publication Parser Module Overview Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/PublicationParser.rst This section documents the `scholarly.publication_parser` module, outlining its members, undocumented members, and inheritance structure. It provides an overview of the module's functionality for parsing publication data. ```Python import scholarly.publication_parser # The following directives are used to generate documentation for the module: # :members: # :undoc-members: # :show-inheritance: ``` -------------------------------- ### AuthorParser Module Members Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/AuthorParser.rst This section documents the members of the scholarly.author_parser module. It includes functions and classes used for parsing author information from Google Scholar profiles. The module handles tasks such as extracting author names, affiliations, and other relevant details. ```Python import scholarly.author_parser # Accessing members of the module # Example: scholarly.author_parser.some_function() ``` -------------------------------- ### AuthorParser Undocumented Members Source: https://github.com/scholarly-python-package/scholarly/blob/main/docs/AuthorParser.rst This section includes documentation for the undocumented members of the scholarly.author_parser module. These members might include internal functions or classes that are not part of the public API but are still part of the module's implementation. Understanding these members can provide deeper insight into the module's workings. ```Python import scholarly.author_parser # Accessing undocumented members (if any) # Example: scholarly.author_parser._internal_function() ``` -------------------------------- ### Citation BibTeX Entry Source: https://github.com/scholarly-python-package/scholarly/blob/main/README.md This BibTeX entry provides the citation information for the scholarly Python package. It includes the authors, title, year, DOI, license, URL, and version. ```BibTeX @software{cholewiak2021scholarly, author = {Cholewiak, Steven A. and Ipeirotis, Panos and Silva, Victor and Kannawadi, Arun}, title = {{SCHOLARLY: Simple access to Google Scholar authors and citation using Python}}, year = {2021}, doi = {10.5281/zenodo.5764801}, license = {Unlicense}, url = {https://github.com/scholarly-python-package/scholarly}, version = {1.5.1} } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.